Design

CSS Gradient Generator

Free CSS gradient generator with real-time preview. Create linear and radial gradients for UI design. Copy CSS code instantly.

CSS Gradient Generator
Create beautiful CSS gradients with real-time preview. Perfect for UI design and web development - copy CSS code instantly.

Preview of your gradient

Gradient Color Stops

background: linear-gradient(90deg, #ff0000 0%, #ffffff 50%, #000000 75%, #0000ff 100% );

About this tool

Create stunning CSS gradients effortlessly with our free online generator. Choose between linear and radial gradients, adjust angles, and customize unlimited color stops with real-time preview. Perfect for UI designers and web developers creating modern interfaces with visual depth. No coding needed - just design, copy the CSS code, and implement in your projects instantly.

How to use the CSS Gradient Generator

  1. Choose Linear or Radial under Gradient Type.
  2. For a linear gradient, set the Angle with the slider or type a value.
  3. Set a colour and Position for each stop, using + Add Stop or Remove to change how many there are.
  4. Click Copy next to Generated CSS Code and paste it into your stylesheet.

Give us your feedback

Help us improve CSS Gradient Generator!

Frequently asked questions

How does a CSS gradient work?

A CSS gradient is an image the browser draws from a list of colour stops. Each stop pairs a colour with a position from 0 to 100 percent, and the browser blends smoothly between them, along an angle for linear gradients or outward from the centre for radial ones.

What does the gradient angle mean?

In linear-gradient, 0deg runs from bottom to top, 90deg from left to right and 180deg from top to bottom. The default here is 90deg, so the stop at 0% sits on the left edge.

Can I make a hard edge instead of a blend?

Yes. Give two neighbouring stops the same position, such as one colour at 50% and the next at 50%, and they meet in a crisp line instead of fading into each other.

What shape is the radial gradient?

Radial gradients are drawn as a circle from the centre of the element. For an ellipse or another starting point, edit the copied code, for example changing circle to ellipse at top left.

Do I need to sign up?

No. The generator is free, and the gradient is built in your browser, so the preview and CSS update instantly as you change the stops.

CSS Gradient Generator screenshot