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.
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
- Pick a preset, or keep the seed and change the controls.
- Press New seed until you like the sky.
- Set the nebula strength, cloud size and the number and size of stars.
- Tick the spiral galaxy and set its arms, pitch, size, tilt and turn.
- Choose a size: desktop, 4K, phone, tablet, square, banner or your own.
- 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
| Preset | Colours | Nebula | Stars in the sky | Spiral galaxy | Size | Stars in the picture |
|---|---|---|---|---|---|---|
| Blue-violet nebula with stars | Deep blue and violet | 90 | 1,400 | – | 1920 × 1080 | 799 |
| Spiral galaxy, two arms | Deep blue and violet | 35 | 1,100 | 2 arms, pitch 14°, tilt 50° | 1920 × 1080 | 610 |
| Spiral galaxy seen face-on, four arms | Violet and pink | 25 | 1,200 | 4 arms, pitch 18°, tilt 0° | 1920 × 1080 | 675 |
| Tilted spiral galaxy | Teal and blue | 30 | 1,300 | 2 arms, pitch 12°, tilt 75° | 1920 × 1080 | 742 |
| Pink and violet nebula | Violet and pink | 85 | 1,200 | – | 1920 × 1080 | 681 |
| Ember-red nebula | Ember red and orange | 80 | 1,000 | – | 1920 × 1080 | 554 |
| Teal nebula, dense stars | Teal and blue | 65 | 2,600 | – | 1920 × 1080 | 1,464 |
| Rose galaxy with three arms | Rose and indigo | 45 | 1,300 | 3 arms, pitch 16°, tilt 40° | 1920 × 1080 | 736 |
| Star field only | Deep blue and violet | 0 | 2,200 | – | 1920 × 1080 | 1,216 |
| Quiet sky, few stars | Black and white | 15 | 500 | – | 1920 × 1080 | 297 |
| Black and white galaxy | Black and white | 20 | 1,500 | 2 arms, pitch 22°, tilt 45° | 1920 × 1080 | 871 |
| Dusk sky with a faint nebula | Dusk (lighter sky) | 40 | 700 | – | 1920 × 1080 | 374 |
| Tightly wound six-arm galaxy | Deep blue and violet | 20 | 1,000 | 6 arms, pitch 9°, tilt 20° | 1920 × 1080 | 559 |
| Phone wallpaper: galaxy low on the screen | Violet and pink | 50 | 1,500 | 2 arms, pitch 15°, tilt 50° | 1170 × 2532 | 678 |
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
| Size | Pixels | Width ÷ height | Stars in the picture (preset Spiral galaxy, two arms) |
|---|---|---|---|
| Desktop | 1920 × 1080 | 1.778 | 610 |
| 4K | 3840 × 2160 | 1.778 | 610 |
| Phone | 1170 × 2532 | 0.462 | 516 |
| Tablet | 2048 × 2732 | 0.750 | 834 |
| Square | 2048 × 2048 | 1.000 | 1,100 |
| Banner | 1500 × 500 | 3.000 | 365 |
Worked out by the tool: the same sky in every size, cropped to its shape.
Arm pitch and how fast the spiral opens
| Pitch | b = tan(pitch) | Radius × per full turn, e^(2πb) | Turns to double the radius |
|---|---|---|---|
| 5° | 0.0875 | 1.73 | 1.26 |
| 9° | 0.1584 | 2.71 | 0.70 |
| 14° | 0.2493 | 4.79 | 0.44 |
| 18° | 0.3249 | 7.70 | 0.34 |
| 22° | 0.4040 | 12.66 | 0.27 |
| 30° | 0.5774 | 37.62 | 0.19 |
| 40° | 0.8391 | 194.85 | 0.13 |
Worked out from the spiral rule r = a e^(bθ) that the tool draws.
What downloads
| Download | What is in it |
|---|---|
| PNG | The picture at the full size you chose, every pixel exactly as drawn |
| JPG | The 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 want | Use |
|---|---|
| A nebula, star field or spiral galaxy background | Galaxy Background Generator (this page) |
| A planet with rings, on its own | Planet Generator |
| Flames or embers | Fire Background Generator |
| Smooth colour blends | Mesh 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.
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.