CSS Gradient Generator

Home » Developer Tools » CSS Gradient Generator

Build a linear or radial gradient with live preview, then copy valid CSS in one click.

CSS outputCopy and paste ready

Output is standard CSS for modern browsers. For very old browsers, add a solid fallback color from the first stop before the gradient line.

A CSS gradient is a smooth blend between two or more colors, made in code, with no image file needed. The CSS Gradient Generator lets you build one visually and copy the exact CSS for your stylesheet.

Pick linear or radial, set the angle or shape, add up to 6 color stops, and watch the preview update live. The CSS output updates with every change.

How to Use This Tool

  1. Pick a type: choose linear for a straight blend, or radial for a blend outward from the center.
  2. Set direction or shape: use the angle slider for linear gradients, or pick circle or ellipse for radial gradients.
  3. Adjust the stops: pick a color and a position percent for each stop, add stops up to 6, or remove extras.
  4. Copy the CSS: click Copy CSS and paste the line into your stylesheet. Or start from Sunset, Ocean, Purple Dream, or Forest.

Sample CSS

A linear gradient looks like this: background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%); A radial gradient looks like this: background: radial-gradient(circle, #7c3aed 0%, #06b6d4 100%); Both are single background lines you can paste into any rule.

Why Use This Tool

Frequently Asked Questions

01.Is the CSS Gradient Generator free to use?

Yes, it is completely free with no sign up and no limits. You can build as many gradients as you like.

02.What CSS does it output?

Valid CSS you can paste straight into a stylesheet, for example background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%); for linear gradients, and the radial equivalent for radial gradients.

03.How many color stops can I use?

From 2 to 6 stops. Click Add Stop to add one, up to 6, and Remove on any stop to take it away, as long as at least 2 stops remain.

04.What is the difference between linear and radial gradients?

A linear gradient blends colors along a straight line set by the angle. A radial gradient blends outward from a center point, in a circle or an ellipse shape.

05.Can I start from a preset?

Yes. Sunset, Ocean, Purple Dream, and Forest are ready presets. Click one to load it, then change any color, position, angle, or shape.

06.Does the output work in all browsers?

The output uses standard CSS gradient syntax, which modern browsers support. Older browsers may need a fallback solid color, which you can add from the first stop color.