Skip to content

All tools

CSS Gradient Generator

Design linear and radial gradients visually and copy the CSS.

  • 100% free
  • Live preview
  • Up to five colors

Type

135°
0%
100%

Last reviewed by the OnlineToolPro team

What is the CSS Gradient Generator?

Build a CSS gradient with up to five colors, adjust the angle and each color's position, and see it change live. The code includes a solid fallback color.

How it works

How to use the CSS Gradient Generator

3 simple steps. No experience needed.

What can you use it for?

  • Create a background for a hero section or button.
  • Match a gradient from a design mock-up.
  • Experiment with color combinations.

Linear and radial gradients

A linear gradient blends colors along a straight line at the angle you choose — 90° runs left to right, 180° top to bottom. A radial gradient spreads outward from the center.

Color positions

Each color has a position from 0% to 100%. Moving two colors close together gives a sharp edge; spreading them apart makes a soft blend.

FAQ

Frequently asked questions

Why is there a solid color first?

It's a fallback for the rare browser that can't draw gradients.

Can I use the gradient as a background image?

Yes. The generated background-image code works on any element and can be layered with other backgrounds.

Other tools you might find useful next.

More CSS Tools

Generate and tidy up CSS with live previews. 4 free tools.

Browse CSS tools
Other categories:YouTubeTextImagesPDFs