Create CSS linear or radial gradients with a live preview.
Generated locally in your browser.
Understanding your result
Linear gradients run along an angle; radial gradients spread out from the centre.
Formula and method
The output uses the CSS linear-gradient() or radial-gradient() function with your colours and angle.
Worked example
A 90° blue-to-violet gradient outputs “background: linear-gradient(90deg, #2563eb, #7c3aed);”.
How to use this tool
- Choose linear or radial.
- Pick the two colours and (for linear) the angle.
- Copy the CSS.
Common mistakes to avoid
- Using two very similar colours, which makes the gradient look flat.
About the CSS Gradient Generator
Design a CSS gradient and copy the ready-to-use background code, with a live preview as you adjust it.
Explore all Developer Tools tools
Frequently asked questions
Can I use it as a background?
Yes. Paste the generated rule onto any element’s background property.