Skip to main content

CSS Gradient Generator

CSS Gradient Generator builds a CSS gradient visually and gives you the code to copy.

Gradient type
Color stops (2)
Color stop 1
Color stop 2

Type: LinearStops: 2Angle: 135°

CSS declaration
linear-gradient(135deg, #6366f1 0%, #ec4899 100%)

Gradient colors are not automatically accessible for text. Check text/background contrast separately.

Build CSS gradients visually and copy the generated CSS. Pick a type (linear, radial, or conic), add 2 to 8 color stops with HEX colors and positions, and adjust the angle or position. The preview and the CSS update live and everything is generated in your browser — colors, stops, and CSS are never uploaded or stored. This is different from the Color Palette Generator, which produces a set of separate colors rather than one continuous background.

Generated locally in your browser

How to use it

  1. Choose a gradient type: linear, radial, or conic
  2. Add color stops (2 to 8) and set each color and position
  3. Adjust the angle for linear/conic, or the shape and position for radial/conic
  4. Copy the generated CSS declaration or the bare gradient value

Choose a linear, radial, or conic gradient and add between two and eight color stops, each with a HEX color and a position from 0 to 100 percent. For a linear gradient you set the angle in degrees; for a conic gradient you set the starting angle; for radial and conic gradients you pick a position such as center or top left, and a radial gradient can be drawn as a circle or an ellipse. A large preview and the generated CSS update live as you work, and everything is composed in your browser from validated values, so your colors, stops, and CSS are never uploaded or stored. Colors are edited as HEX codes alongside a native color picker. This is different from the Color Palette Generator, which produces a set of separate swatches rather than one continuous background. A gradient's colors are not automatically accessible for text — check the text and background contrast separately with the WCAG Contrast Checker.

FAQ

We use cookies to run this site and, with your consent, to understand usage and personalize ads. You can change your choice at any time.