Skip to content

CSS gradient generator

Create linear or radial gradients and copy the ready-to-use CSS code.

CSS code
/* Fallback for older browsers */ background-color: {{ color1 }}; /* CSS3 gradient */ background-image: {{ gradientStyle }};

Settings

Gradient type
Linear
Radial
Colors
Angle / direction {{ angle }}°

What is a CSS gradient?

A CSS gradient displays a smooth transition between two or more colors. Unlike an image created in Photoshop or Figma, a CSS gradient is generated dynamically by the browser. It is one of the most efficient web design techniques, because it requires no HTTP request (no image to download) and adapts perfectly to every screen resolution with no loss of quality.

Difference between linear-gradient and radial-gradient

  • Linear-gradient: Colors blend along a straight line. You can control the direction of that line with an angle in degrees (e.g.: 90deg to go from left to right) or keywords (e.g.: to right bottom).
  • Radial-gradient: Colors start from a central point and spread outward in a circle or ellipse, often simulating a light source (halo effect).

Why include a color "fallback"?

Our generator gives you a background-color line before declaring the gradient image. This practice (called a Fallback) ensures that if a user visits your site with a very old browser (or an email client that does not support CSS3), they will at least see the main color instead of a transparent background that could make your text unreadable.

More design tools:

How it works

How to use the CSS gradient generator

Create linear or radial gradients and copy the ready-to-use CSS code.

  1. Choose the colors

    Add and position the color stops.

  2. Set the angle

    Type, direction and positions.

  3. Copy the result

    Copy or download the result in one click.

FreeNo subscription, no hidden limits.
No sign-upOpen the page and use the tool. That’s it.
InstantResults in seconds, on mobile too.
PrivateEverything runs in your browser.

About the CSS gradient generator

CSS gradients are a good replacement for images: lighter, sharp at any size and editable at any time.

css gradient generator linear gradient css radial gradient generator gradient background css css background gradient gradient maker color gradient generator
FAQ

Frequently asked questions about the CSS gradient generator

Linear or radial?

Linear follows a direction. Radial starts from a center and spreads outward.

Is the code compatible?

Yes, with all modern browsers.

Can I add more than two colors?

Yes, as many as you like.

How do I use it as a background?

Paste the code into the background property of your element.

Esc
↑ ↓ navigateEnter open