Use this free CSS gradient generator to build linear, radial, and conic gradients and copy the code in seconds — no signup, no design skills required.
How it works
A CSS gradient blends two or more colors together directly in the browser, with no image file involved. Every gradient this tool produces comes down to one CSS rule: a background property set to a linear-gradient(), radial-gradient(), or conic-gradient() function.
Here’s what each part of that function controls:
- Gradient type —
linear-gradient,radial-gradient, orconic-gradientdecides the overall shape the color blend follows. - Direction — an angle in degrees (linear, conic) or a center point (radial, conic) decides where the gradient starts and which way it flows.
- Color stops — each color you add is placed at a percentage position along the gradient. The browser blends smoothly between stops, so two stops at 0% and 100% gives a simple two-color fade, while more stops let you build multi-color transitions.
Adjust any control in the tool above and the CSS output box updates instantly — copy it straight into your stylesheet, no manual editing needed.
Linear vs. radial vs. conic gradients explained
The three gradient types produce different shapes, and picking the right one depends on what you’re designing.
Linear gradients blend colors along a straight line, in the direction you set with the angle control. This is the most common gradient type for backgrounds, buttons, and banners — a 90-degree angle blends left to right, 180 degrees blends top to bottom, and any angle in between gives a diagonal fade.
Radial gradients blend colors outward from a center point in a circle or ellipse, similar to a spotlight or vignette effect. They work well for highlighting a focal point, like a hero image overlay or a soft glow behind a logo.
Conic gradients blend colors in a rotation around a center point, like the colors on a color wheel or the hands of a clock sweeping around. They’re less common but useful for pie-chart-style visuals, loading spinners, and decorative badges.
If you’re not sure which to use, start with linear — it covers the large majority of real-world use cases and has the widest design familiarity.
CSS gradient syntax reference
For anyone who wants to write or edit the code by hand, here’s the syntax behind each gradient type this tool generates.
Linear gradient:
background: linear-gradient(90deg, #0F0D72 0%, #FFC502 100%);
The first value is the angle, followed by a comma-separated list of colors and their positions.
Radial gradient:
background: radial-gradient(ellipse at center, #0F0D72 0%, #FFC502 100%);
The first value sets the shape (circle or ellipse) and center position, followed by the color stops.
Conic gradient:
background: conic-gradient(from 0deg at center, #0F0D72 0%, #FFC502 50%, #0F0D72 100%);
The from value sets the starting angle, at sets the center position, and the color stops are listed the same way.
All three gradient functions are part of the CSS3 specification and work as standard background values — no vendor prefixes are needed in any current browser.
When to use a CSS gradient?
- Site owners — replace a flat-color hero section or call-to-action button background with a gradient for a more modern, less “default theme” look, without touching an image editor.
- Freelancers & designers — prototype background treatments quickly during client design reviews, then hand off clean, production-ready CSS instead of a flattened image export.
- WordPress users — paste the generated CSS into the Custom CSS field of most page builders (Elementor, Divi, the Block Editor’s Additional CSS panel) to apply a gradient to any section background without a plugin.
FAQ
Is this gradient generator free to use?
Yes. This is a free online gradient generator with no signup, account, or watermark — generate and copy as many gradients as you need.
Do I need to add vendor prefixes to the CSS?
No. linear-gradient(), radial-gradient(), and conic-gradient() are supported without vendor prefixes in all current major browsers, including Chrome, Firefox, Safari, and Edge. Conic gradients have slightly newer browser support than linear and radial, so double-check compatibility if you need to support older browser versions.
Can I use more than two colors in a gradient?
Yes. Add as many color stops as you need using the “Add stop” button in the tool — each stop can be placed at any position along the gradient and will blend smoothly with its neighbors.
How do I add a gradient background to my WordPress site?
Copy the generated CSS from this tool and paste it into your page builder’s custom CSS field (Elementor, Divi, and most builders support this per-section), or into the WordPress Block Editor’s Additional CSS panel under Appearance > Customize for a sitewide gradient.
What’s the difference between a CSS gradient and a gradient image?
A CSS gradient is generated by the browser using code, so it loads instantly, scales perfectly at any screen size, and requires no image file — unlike a gradient exported as a JPG or PNG, which adds an HTTP request and can look pixelated when stretched.
Can I use these gradients as a text color or border, not just a background?
This tool generates the gradient value itself, which is most commonly used as a background. The same value can also be applied to border-image for gradient borders, or combined with background-clip: text for gradient text — both require a small amount of extra CSS beyond what’s copied here.
