Galaxy Background Generator

Make a galaxy or space background for a desktop, a phone or a design: glowing nebula clouds, a field of stars and, if you like, a spiral galaxy. Pick a preset or set your own: how strong the nebula is and how big its clouds are, how many stars and how large, the number of spiral arms, how tightly they wind, the tilt and the turn. Every picture comes from a seed number: the same seed and size always give the same picture, and New seed gives you a fresh sky. Choose desktop, 4K, phone, tablet, square, banner or your own size up to 4096 pixels; the stars and clouds sit at the same places in every size, so a desktop and a phone picture from one seed match. It is artwork drawn from maths, not a photograph. Download a PNG or JPG. Nothing is uploaded.

100% private — everything runs in your browser. Everything runs in your browser; nothing is uploaded.

100% private — runs in your browser

The preview is the same picture drawn smaller. PNG and JPG download at the full size; the same seed and size always give the same picture.

Picture

Nebula and stars

Spiral galaxy

Runs in your browser with our own code: nothing you type is uploaded or saved. Every star, cloud and arm is drawn by our own code from the seed; it is artwork, not a photograph. You may use what you make here, including commercially, with no credit needed.

How to make a galaxy background

  1. Pick a preset, or keep the seed and change the controls.
  2. Press New seed until you like the sky.
  3. Set the nebula strength, cloud size and the number and size of stars.
  4. Tick the spiral galaxy and set its arms, pitch, size, tilt and turn.
  5. Choose a size: desktop, 4K, phone, tablet, square, banner or your own.
  6. Download the PNG or JPG.

What you can use it for

  • Desktop and phone wallpapers
  • Backgrounds for slides, videos and streams
  • Covers, posters and album art
  • Game, story and classroom space scenes
  • Website hero images
  • Matching desktop and phone pictures from one seed

The 14 presets

PresetColoursNebulaStars in the skySpiral galaxySizeStars in the picture
Blue-violet nebula with starsDeep blue and violet901,400–1920 × 1080799
Spiral galaxy, two armsDeep blue and violet351,1002 arms, pitch 14°, tilt 50°1920 × 1080610
Spiral galaxy seen face-on, four armsViolet and pink251,2004 arms, pitch 18°, tilt 0°1920 × 1080675
Tilted spiral galaxyTeal and blue301,3002 arms, pitch 12°, tilt 75°1920 × 1080742
Pink and violet nebulaViolet and pink851,200–1920 × 1080681
Ember-red nebulaEmber red and orange801,000–1920 × 1080554
Teal nebula, dense starsTeal and blue652,600–1920 × 10801,464
Rose galaxy with three armsRose and indigo451,3003 arms, pitch 16°, tilt 40°1920 × 1080736
Star field onlyDeep blue and violet02,200–1920 × 10801,216
Quiet sky, few starsBlack and white15500–1920 × 1080297
Black and white galaxyBlack and white201,5002 arms, pitch 22°, tilt 45°1920 × 1080871
Dusk sky with a faint nebulaDusk (lighter sky)40700–1920 × 1080374
Tightly wound six-arm galaxyDeep blue and violet201,0006 arms, pitch 9°, tilt 20°1920 × 1080559
Phone wallpaper: galaxy low on the screenViolet and pink501,5002 arms, pitch 15°, tilt 50°1170 × 2532678

Worked out by the tool. The stars are spread over a square the width of the long side, so a wide picture shows about half of them.

One seed, every size

SizePixelsWidth ÷ heightStars in the picture (preset Spiral galaxy, two arms)
Desktop1920 × 10801.778610
4K3840 × 21601.778610
Phone1170 × 25320.462516
Tablet2048 × 27320.750834
Square2048 × 20481.0001,100
Banner1500 × 5003.000365

Worked out by the tool: the same sky in every size, cropped to its shape.

Arm pitch and how fast the spiral opens

Pitchb = tan(pitch)Radius × per full turn, e^(2πb)Turns to double the radius
5°0.08751.731.26
9°0.15842.710.70
14°0.24934.790.44
18°0.32497.700.34
22°0.404012.660.27
30°0.577437.620.19
40°0.8391194.850.13

Worked out from the spiral rule r = a e^(bθ) that the tool draws.

What downloads

DownloadWhat is in it
PNGThe picture at the full size you chose, every pixel exactly as drawn
JPGThe same picture as a smaller JPG (quality 92)

To change the size of a picture afterwards, use the Image Resizer; for a smooth colour background, the Mesh Gradient Generator.

Which tool to use

You wantUse
A nebula, star field or spiral galaxy backgroundGalaxy Background Generator (this page)
A planet with rings, on its ownPlanet Generator
Flames or embersFire Background Generator
Smooth colour blendsMesh Gradient Generator

Other tools: the Planet Generator for planets, and the Phone Wallpaper Maker for photo wallpapers.

More free tools

Backgrounds and wallpapers?

Picture and colour tools that run privately in your browser, with no sign-up and no watermark.

See all free tools →

Frequently asked questions

Is this a real photo of space?

No. Every star, cloud and arm is drawn by our own code from the seed: it is artwork made from maths, not a photograph or a telescope image.

How is the nebula made?

From noise: a smooth random pattern added up at six sizes, each half as strong as the one before, and gently warped. Where it is above a level, it glows in a mix of the two nebula colours, more strongly with a higher nebula setting.

How are the spiral arms drawn?

Each arm follows a logarithmic spiral, r = a e^(bθ), where b is the tangent of the pitch angle you set. A small pitch winds the arms tightly; a large one opens them up. The table below shows how much each turn widens the spiral.

What does the seed do?

It fixes where every star and cloud goes. The same seed and size give exactly the same picture, pixel for pixel, so you can come back to a sky you liked or share the seed with someone.

Why do the stars line up between sizes?

Every star and cloud is placed as a fraction of the picture’s long side, measured from the centre. A phone picture from one seed is the same sky as the desktop one, cropped to the tall shape.

Which size should I pick for my phone?

Phone 1170 × 2532 suits most current phones; for anything else choose Your own size and type the pixels. The picture is drawn at that size, not stretched.

What do the spikes on bright stars do?

They add four thin rays to the brightest stars for a sparkle. Untick them for plain round stars.

Is it free?

Yes. There is no sign-up, no watermark and no limit.

Is anything uploaded?

No. Every pixel is worked out by JavaScript in your browser. Nothing you type is sent anywhere or saved when you close the page.