CSS Gradient Generator
Build a linear CSS gradient visually — set the angle and add as many color stops as you need — then copy the generated CSS.
CSS
background: linear-gradient(90deg, #6366f1 0%, #ec4899 100%);Everything you enter is processed in your browser and isn't sent to our servers.
How to use CSS Gradient Generator
- 1Adjust the angle slider.
- 2Set each color stop's color and position, or add more stops.
- 3Preview the gradient live, then copy the CSS.
About this tool
This generates a standard CSS linear-gradient() with the angle and color stops you set, in the exact syntax browsers expect — no vendor prefixes needed for any modern browser. Each stop has a color and a position (0-100%) along the gradient line.
The live preview updates instantly as you adjust anything, so you can fine-tune the angle and stop positions visually before copying the final CSS into your stylesheet.
Worked example: the starting gradient, linear-gradient(90deg, #6366f1 0%, #ec4899 100%), blends indigo into pink from left to right. Angles follow the CSS convention — 0deg points up, 90deg to the right and 180deg down — so changing the angle to 180deg makes the same colours run from top to bottom. Moving the first stop from 0% to 30% keeps the left 30% solid indigo before the blend begins, and adding a third stop at 50% puts a new colour in the middle of the transition.
Frequently asked questions
This tool generates linear gradients specifically. The CSS syntax is similar for radial-gradient(), but the angle and stop positions work differently, so it's kept as a separate, focused tool rather than one confusing combined interface.
As many as you like — click Add color stop repeatedly. A gradient needs at least two color stops, so the tool won't let you remove the last two.