CSS Gradient Generator

Create beautiful CSS gradients with preview

Share this tool

Report a problem

Describe the problem without including private input or files.

How useful was this tool?

How useful was this tool?

Gradient settings

Color stops

Color stop 1

Color stop 2

Preset gradients

Gradient tips

Use linear gradients for smooth directional color transitions.

Radial gradients work well for creating spotlight or focus effects.

Conic gradients are perfect for color wheels and angular patterns.

Adjust color stop positions to control the gradient’s color distribution.

Use similar hue colors for subtle gradients or contrasting colors for bold effects.

Live preview

CSS shorthand

background: linear-gradient(to right, #3B82F6 0%, #8B5CF6 100%);

CSS property

background-image: linear-gradient(to right, #3B82F6 0%, #8B5CF6 100%);

CSS class

.gradient-bg {
  background: linear-gradient(to right, #3B82F6 0%, #8B5CF6 100%);
}

Adjust colors and positions. The preview updates as you work.

About CSS Gradient Generator

Our free CSS gradient generator makes it easy to create beautiful, smooth color transitions for any web project. Build linear gradients, radial gradients, and conic gradients with full control over colors, positions, directions, and angles -- all with a real-time visual preview.

From a subtle two-color hero background to a multi-stop progress bar, you get up to 10 color stops with precise position control. Choose from preset templates like Sunset, Ocean, Forest, and Purple Rain, or use the random generator to discover unique gradient color combinations for your designs.

The generator instantly produces clean CSS gradient code that you can copy or download as a PNG image. Multiple output formats are provided, including background shorthand, background-image property, and a ready-to-use CSS class. Nothing you create is uploaded or stored.