CSS Gradient Generator

Design a gradient background for a website, button or slide. Choose colors and positions, see the result live, and copy one line of CSS that works in every modern browser.

Runs entirely in your browser. Nothing you enter is uploaded or stored.

Type

Color stops

Presets

How to create a CSS gradient

  1. Choose Linear (colors change along a line), Radial (from a center point outwards) or Conic (around a center point, like a color wheel).
  2. Set the colors with the color pickers and drag each stop's slider to choose where along the gradient it sits (0% = start, 100% = end). Add up to eight colors.
  3. For linear gradients, set the angle: 0° goes from bottom to top, 90° from left to right, 180° from top to bottom.
  4. Copy the CSS and paste it into your stylesheet.

Using the generated CSS

.hero {
  background: linear-gradient(135deg, #4338ca 0%, #ec4899 100%);
}

Gradients are images in CSS, so use them with background or background-image, not background-color. All modern browsers support linear, radial and conic gradients without vendor prefixes.

Linear, radial or conic?

Linear gradients are the most common: page and hero backgrounds, buttons, subtle shading on cards. Radial gradients work well for spotlights, vignettes and glowing effects. Conic gradients sweep around a point and are used for pie-chart style indicators, color wheels and decorative backgrounds. All three accept the same color stops, so you can switch type and keep your colors.

Frequently asked questions

Do CSS gradients work in all browsers?

Yes. Linear and radial gradients are supported by every current browser, and conic gradients by all major browsers released since 2020. No vendor prefixes are needed.

Are CSS gradients better than gradient images?

Usually. They load instantly (no file to download), scale to any size without blurring and are easy to change. Use an image only for complex effects CSS can’t create.

How do I add a gradient to text?

Set the gradient as the background, then add background-clip: text and color: transparent to the text element.

Can I use the gradients commercially?

Yes. The CSS you create is yours to use anywhere.