Skip to main content

CSS Gradient Text Generator

New

Build CSS gradient-filled text using background-clip: text, with adjustable colors, angle, and font size, plus a live preview and copyable CSS.

gradienttext effectcssbackground-cliptypography
Read the guide
Shortcuts:⌘ KSearch

Gradient Text

CSS
—

This uses background-clip: text combined with a transparent text color, so the linear gradient background shows through the exact shape of the letters. The -webkit- prefixed properties are still required for full cross-browser support, including current Safari.

Continue with:

Frequently Asked Questions

How does gradient text actually work in CSS?

It applies a linear gradient as the element's background, then uses `background-clip: text` to clip that background so it's only visible within the shape of the text characters, combined with making the text color itself transparent so the gradient shows through instead of solid text.

Why does the generated CSS include `-webkit-` prefixed properties?

`background-clip: text` and the transparent text-fill trick historically required WebKit-specific prefixes for Safari support, and while modern Chrome/Firefox support the unprefixed version, including both prefixed and unprefixed properties together maximizes compatibility across current and slightly older browsers.

Will this work on any text element, like headings and paragraphs?

Yes — apply the generated `.gradient-text` class to any inline or block text element (h1, p, span, etc.); it only affects the fill/background of the text itself and doesn't change layout, font weight, or size on its own.

Can I use more than two colors in the gradient?

This tool's builder is fixed to a two-color gradient for simplicity, but you can manually extend the copied CSS's `linear-gradient()` value with additional comma-separated colors — the background-clip technique works identically with any number of gradient stops.

Does gradient text affect accessibility or text selection?

Selecting and copying the text works normally since it's still real text (not an image), but be mindful of contrast — a gradient that fades to a very light color against a light page background can become hard to read, so it's worth checking readability against your actual page background.

Related Tools