Developer Tools
CSS Gradient Generator
Build a linear or radial CSS gradient visually and copy the ready-to-paste code.
Updated July 10, 2026
How to use the css gradient generator
- 1Pick color one and color two.
- 2Choose linear or radial, and set the angle.
- 3Watch the live preview update.
- 4Copy the CSS background rule into your stylesheet.
Common uses
- Creating a gradient background for a site or button
- Prototyping color blends quickly
- Generating clean CSS without a design app
- Matching a gradient to a brand palette
Frequently asked questions
How does a CSS gradient work?
A gradient is a background image drawn by the browser, blending between colors. linear-gradient runs along an angle you set; radial-gradient spreads outward from the center. Because it's generated in CSS, it stays sharp at any size and adds no file to download.
What does the angle mean?
The angle sets the direction of a linear gradient. 0deg goes from bottom to top, 90deg from left to right, 180deg top to bottom. So 90deg with color one then color two fades left to right across the element.
Can I add more than two colors?
This tool builds a clean two-color gradient. To add more stops, paste the copied rule into your CSS and add extra colors with optional percentages, like linear-gradient(90deg, red, yellow 50%, green). The syntax extends naturally.
About this tool
The CSS gradient generator lets you build a linear or radial gradient between two colors with a live preview and copy the exact CSS. Pick your colors, set the angle for a linear gradient or switch to radial, and paste the generated background rule straight into your stylesheet. Gradients are pure CSS, so they scale to any size with no image file and add no page weight. Everything renders live in your browser and nothing is uploaded.
Like most tools on UtilityBase, the css gradient generator runs entirely in your browser — nothing you enter is uploaded or stored on a server. It's free to use with no account required. Browse more developer tools here.
Was this tool helpful?
Related tools
Hex to RGB Converter
Convert colors between HEX, RGB, and HSL — edit any field and the rest update.
Developer Tools
Color Palette Generator
Turn one base color into complementary, analogous, triadic, and shade palettes.
Generators
Color Picker
Pick a color and get HEX, RGB, and HSL values with shades and tints.
Image Tools
Color Contrast Checker
Check WCAG contrast ratios between text and background colors — AA and AAA.
Developer Tools
What Is My IP
Your public IP, and exactly what it reveals — location, ISP, timezone.
Developer Tools
Regex Tester
Test regular expressions live with match highlighting, groups, and a cheat sheet.
Developer Tools