CSS Gradient Generator
Build a linear, radial or conic gradient with up to four colours. Copy the CSS or save it as a PNG at any size.
CSS Gradient Generator builds a linear, radial or conic gradient from two to four colours with positions you set. It shows a live preview, gives you the CSS background line to copy, and can also save the gradient as a PNG image up to 6000 pixels a side.
What kinds of CSS gradient are there?
Linear gradient
Colours blend along a straight line at an angle. 0 degrees runs bottom to top and 90 degrees runs left to right.
Radial and conic gradients
A radial gradient spreads out from the centre as a circle or an ellipse. A conic gradient sweeps around the centre like the hands of a clock, starting at the angle you choose.
Why use CSS Gradient Generator?
- See it as you build it. Every change to colours, positions or angle updates the preview straight away.
- Code or image. Copy the CSS for a website, or switch the output to PNG for slides, social posts or wallpapers.
- Exact geometry. The PNG follows the same rules browsers use for CSS gradients, so the image matches the CSS.
How to use CSS Gradient Generator, step by step

- Choose a type in CSS Gradient Generator. Linear, radial or conic, then set the angle or shape.
- Set your colours. Pick two, three or four colours and give each a position from 0 to 100 percent.
- Copy the CSS or save a PNG. Leave the output on CSS code and press Copy text, or choose PNG image, enter a size and download it.
Frequently asked questions
How large can the PNG be?
Up to 6000 by 6000 pixels. Very large images take a moment to draw, because the work happens in your browser.
Why will the conic PNG not save?
Drawing conic gradients to an image needs a recent browser. If yours is older, copy the CSS instead or update the browser.
Does the CSS work in every browser?
Linear and radial gradients work in every current browser. Conic gradients work in all current versions of Chrome, Edge, Firefox and Safari.
Looking for the long version? The guides cover each of these jobs in depth.