Create a CSS Gradient

Type

Color stops

Pick colors, drag the stops and set the angle while the preview updates, then copy one line of CSS for a button, a hero section or a card background.

  • Free
  • Runs in your browser
  • Up to 8 color stops
  • No sign-up
How it works

How It Works

Make a gradient in three steps.

01

Choose a type

Linear for a straight blend, radial from a center, conic around a point.

02

Adjust stops and angle

Change colors and positions, add stops in between or remove them.

03

Copy the CSS

Paste the two background lines into your stylesheet.

About

Linear, radial or conic gradient?

CSS draws gradients without any image file. A linear-gradient blends along a straight line at the angle you set (90deg goes left to right, 180deg top to bottom). A radial-gradient spreads out from the center as a circle or an ellipse that fits the box. A conic-gradient sweeps around the center like a color wheel, which is how pie charts and some loading spinners are drawn in pure CSS.

Blending two saturated opposite colors, such as blue and orange, can pass through a dull grey middle. Adding a brighter stop in between often looks better.

Up to 8 stops

Each stop has a color and a position from 0% to 100%. Two stops at the same position make a hard edge instead of a blend.

Smart new stops

A new stop is placed in the widest gap between existing ones, with the color of the stop before it.

Fallback included

The CSS starts with a solid background in the first color, then the gradient.

Supported everywhere

Linear and radial gradients work in every current browser, and conic gradients in Chrome, Edge, Safari and Firefox releases since 2020.

Features

Why Use This Gradient Generator

See it before you write it.

Large live preview

The gradient updates as you drag.

Three types

Linear, radial and conic from one panel.

Clean CSS

Two lines, ready to paste, with a solid color fallback.

No sign-up

Free, in your browser.

✓ No Registration✓ Free✓ Browser-based✓ Text Stays Local
FAQ

Frequently Asked Questions

Questions people ask about the CSS Gradient Generator.

Copy it into the rule for your element, for example .hero { … }. It sets the background property, so it replaces any background color or image on that element.