CSS gradient generator: linear, radial and conic gradients
Choose the gradient type, set two colors (and an optional middle one), and copy a ready background declaration.
- Free, no sign-up
- Your files and data stay on your device
- No watermarks or limits
0 bytes uploaded. Everything happens in this tab.
How to use it
- Pick the Type: Linear, Radial or Conic, and set the Angle (degrees) for linear and conic gradients.
- Choose Color 1 and Color 2 with their positions in percent, or tick “Add a middle color” for a third stop.
- Look at the preview, try one of the six numbered presets if you want a quick start, then press “Copy CSS”.
Example
Default blue to coral at 135 degrees:
background: linear-gradient(135deg, #2e47ff 0%, #ff7a59 100%);
About this tool
A CSS gradient is an image drawn by the browser from a list of color stops, so it needs no file and scales to any size. A linear gradient blends colors along a straight line at an angle, a radial gradient spreads outward from the center, and a conic gradient sweeps around the center like the hands of a clock. This tool writes the correct syntax for all three.
Each color has a position in percent. The tool sorts the stops by position before writing them, so you can enter them in any order, and it writes every color as a HEX value. With three stops you can build a middle highlight or a darker band. The Repeating option switches to repeating-linear-gradient and its radial and conic equivalents; it only makes a visible pattern when your last stop is before 100%, for example when the second stop is at 25%, because otherwise there is nothing left to repeat.
Keep a few practical points in mind. The Angle is ignored by a radial gradient, which is always a circle at the center here. Text on a gradient needs enough contrast at every point of the background, not just at one end. A very wide gradient between two similar-looking colors can show visible bands on some screens. The result is plain CSS that you paste into your own stylesheet, and no color you choose is stored or sent anywhere.
Frequently asked questions
What is the difference between linear, radial and conic gradients?
Linear runs along a line at an angle, radial spreads out from a center point, and conic rotates around a center point.
Which angle points where?
0 degrees points up, 90 degrees points right, 180 degrees points down and 270 degrees points left. The default 135 degrees runs from the top left to the bottom right.
Why does the Repeating option show no pattern?
A repeating gradient repeats the part between the first and last stop. If the stops already cover 0% to 100%, nothing is left to repeat. End the last stop earlier, for example at 25%.
Can I use more than three colors?
Not in this tool, which writes two or three stops. You can edit the copied CSS by hand and add more stops in the same format.
Do I need vendor prefixes?
No. Current browsers support the unprefixed gradient syntax.