CSS Gradient Generator

Design CSS gradients with live preview.

Gradient type
Color stops
CSS

Design CSS gradients in seconds

This CSS gradient generator lets you build smooth linear and radial gradients visually, without hand-editing values. Choose a type, drag the angle, and add as many color stops as you need — the preview and the ready-to-paste CSS update live with every change. It's perfect for hero sections, buttons, cards, and backgrounds where a flat color feels a little plain.

How to use the gradient generator

  1. Choose Linear or Radial as the gradient type.
  2. For linear gradients, drag the Angle slider to set the direction.
  3. Click a color swatch to change a stop, and edit its position percentage.
  4. Use Add color stop for more colors, or Randomize for a fresh pair.
  5. Click Copy CSS and paste the code into your stylesheet.

Linear vs. radial gradients

A linear gradient blends colors along a straight line you rotate with the angle control, while a radial gradient spreads outward from a center point. Both accept the same list of color stops, so you can switch types at any time and keep your palette.

Pair it with your palette

Great gradients start with great colors. Build a matching scheme with the color palette generator, then add depth to your components with the CSS box shadow generator. Everything runs in your browser, so you can experiment freely and privately.

Frequently asked questions

How does the CSS gradient generator work?

Pick a gradient type, adjust the angle, and add or edit color stops. The preview box and the CSS output update live as you make changes. When you are happy, click Copy CSS and paste it straight into your stylesheet.

What is the difference between a linear and radial gradient?

A linear gradient blends colors along a straight line, so you can set its angle from 0° to 360°. A radial gradient blends outward from a center point in a circle. The angle control only applies to linear gradients.

How many color stops can I add?

You can add as many color stops as you like. Each stop has a color and a position from 0% to 100%. The tool always keeps at least two stops, because a gradient needs two colors to blend between.

Is the background-image line necessary?

The plain background line is enough for every modern browser. The extra background-image line is a harmless, vendor-neutral fallback that some setups prefer when the background shorthand is already used for other properties.

Is my data sent to a server?

No. This gradient generator runs entirely in your browser with JavaScript. Nothing you create is uploaded, stored, or shared, so you can experiment freely and privately.