Text Gradient Tool

Make your typography pop. Clip vibrant linear and radial backgrounds directly to your text and generate the specific `-webkit` code required.

Write Less CSS.
/* Generated on cssgen.org */

Typography meets Gradients

In the past, if a designer wanted a gradient text effect for a hero headline, they had to export it as an image (like a PNG). This was terrible for page speed, awful for accessibility, and meant search engines couldn't read the headline.

Modern CSS solves this elegantly using the background-clip property. By rendering a standard background gradient on a heading element, and then "clipping" that background to the shape of the text, you get beautiful typography that is fully selectable and SEO-friendly. Read the technical documentation on the MDN Web Docs.

✍️

Pro Tips for Gradient Text

  • Font Weight is Crucial: Gradients need physical surface area to be visible. Text gradients look spectacular on heavy, bold fonts (weight 800 or 900). If you apply a gradient to a thin font, it will look like a muddy, unreadable mess.
  • The Fallback Color: What happens if a user is on an ancient browser that doesn't support text clipping? The background won't clip, and the text will disappear! Our generated code automatically includes a solid color property as a fail-safe fallback.
  • Combine with Base Gradients: Looking to generate a background for an entire section, rather than just text? Head over to our Gradient Background Builder.

Frequently Asked Questions

How do you make text have a gradient in CSS?

To create gradient text, you apply a background-image gradient to the text element, use the -webkit-background-clip: text; property to mask the background to the shape of the letters, and finally set -webkit-text-fill-color: transparent; to make the background visible through the text.

Is background-clip supported in all browsers?

Yes, but it strictly requires the -webkit- vendor prefix for compatibility across Chrome, Safari, and Edge. It is safe for production use, but you must include a solid fallback text color for legacy browser versions.

Can I apply a text shadow to gradient text?

Yes, but it can be tricky. Because the text fill color is transparent, standard text shadows might behave unexpectedly depending on the browser. If you need standard text shadows without gradients, try our Text Shadow Generator.