CSS Gradient Text Generator
Generate CSS gradient text effects instantly. Customize colors and direction, preview live, and copy the CSS code.
Preview
CSS Code
.gradient-text {
background: linear-gradient(to right, #6366f1 0%, #ec4899 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}What is CSS Gradient Text?
CSS gradient text applies a color gradient to text by using a gradient as the element's background, then clipping it to the text shape with background-clip: text. This technique creates eye-catching typography without images.
How to Apply Gradient to Text in CSS
Set a gradient background on your element, then apply -webkit-background-clip: text and -webkit-text-fill-color: transparent. The background-clip: text property clips the background to the text, revealing the gradient through the letterforms.
Browser Compatibility
-webkit-background-clip: text is supported in all modern browsers including Chrome, Firefox, Safari, and Edge. The standard background-clip: text property is also well supported. Always include both prefixed and unprefixed versions for full coverage.