How does gradient text work in CSS?

CSS has no "text gradient" property. The usual trick is to paint a gradient as the element's background, clip that background to the shape of the letters with background-clip: text, and make the text fill transparent so the gradient shows through.

Tool description

Type your text, pick a start and end color, set the angle, and the tool shows a live preview and gives you the CSS to copy. You can also change the font family, weight and size, so the preview matches what you will use on your page.

The generated rule looks like this:

.gradient-text {
  background-image: linear-gradient(135deg, #f97316 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
CSS

The real output also includes the font settings and wrapping rules.

Features

  • Two color linear gradient with an angle from 0 to 360 degrees
  • Font family, weight and size controls
  • Live preview you can export as an image, plus ready to paste CSS