CSS Gradient Text Generator

Create stunning gradient text effects with a live preview. Pick start, middle, and end colors, choose a direction, adjust font properties, and copy the generated CSS code -- all client-side in your browser.

Gradient Text
#ff6b6b
#4ecdc4
48px
800
Presets
Generated CSS

          
        

How It Works

🎨

Color Picker

Choose start and end colors with an optional middle color stop. Pick any color using the native color picker or use one of the built-in presets for instant gradient text effects.

Direction Control

Set the gradient direction: left-to-right, top-to-bottom, diagonal, or radial. Each direction creates a unique visual effect. Preview updates instantly as you change direction.

Font Customization

Adjust font size from 16px to 120px, font weight from thin to black, and choose from 8 font families. See your actual text rendered with the gradient in the live preview.

📋

Copy CSS Code

One-click copy of the complete CSS code including background gradient, -webkit-background-clip, and -webkit-text-fill-color properties. Paste directly into your stylesheets.

Understanding CSS Gradient Text

CSS gradient text is achieved by applying a gradient background to a text element and using background-clip: text to clip the background to the text shape. The text color is set to transparent so the gradient shows through. This technique works in all modern browsers and creates visually striking typography effects.

The Gradient Text Technique

The core CSS for gradient text uses three properties: background (or background-image) for the gradient, -webkit-background-clip: text to clip the background to the text, and -webkit-text-fill-color: transparent (or color: transparent) to make the original text color invisible so the gradient shows through.

Linear vs Radial Gradients

Linear gradients transition colors along a straight line, specified with a direction like to right or an angle like 45deg. Radial gradients radiate outward from a center point. Both can be used for gradient text, but linear gradients are more common for horizontal or diagonal text effects.

Common Use Cases

Frequently Asked Questions

How do I create gradient text in CSS?
Apply a gradient as the element's background, then use -webkit-background-clip: text and -webkit-text-fill-color: transparent. The gradient will show through the transparent text. Our generator creates this code automatically.
Does gradient text work in all browsers?
Yes, gradient text works in all modern browsers including Chrome, Firefox, Safari, and Edge. The -webkit-background-clip: text property is widely supported. Our generated code includes both prefixed and standard versions for maximum compatibility.
Can I use more than two colors?
Yes, enable the "Middle Color" option to add a third color stop to your gradient. This creates richer, multi-color gradient text effects. The middle color appears at the 50% position between the start and end colors.
What gradient directions are available?
Our generator supports left-to-right, right-to-left, top-to-bottom, bottom-to-top, diagonal (both directions), and radial gradients. Select the direction from the dropdown and the preview updates instantly.
Can I use custom text for the preview?
Yes, enter any text in the preview text input field and the live preview updates in real time. You can also change the preview background color to see how your gradient text looks on different backgrounds.
How do I copy the generated CSS?
Click the "Copy CSS" button below the generated code. The complete CSS including background gradient, background-clip, and text-fill-color properties is copied to your clipboard, ready to paste into your project.

Explore More Developer Tools

Check out our other free CSS tools. Generate gradients, box shadows, flexbox layouts, and more -- all from your browser with no sign-up required.

CSS Gradient Generator →
Copied to clipboard!