Build linear and radial CSS gradients visually. Copy CSS code with one click.
Create beautiful CSS linear and radial gradients visually. Add color stops, adjust direction and intensity, preview live, and copy the generated CSS code.
Upload your file using the tool above.
Adjust any settings to your preference.
Click the process button and wait for results.
Download your output using the download button.
Because browsers interpolate through sRGB, so two vivid colours on opposite sides of the wheel pass through a desaturated grey in between. The fix is adding an intermediate colour stop to steer the path, or choosing colours nearer each other on the wheel rather than true opposites.
Linear for backgrounds, buttons and anything where you want a directional sweep — it is the workhorse. Radial for spotlight effects, soft glows behind a focal point, and subtle vignettes. Radial draws the eye to its centre, so use it where you actually want attention.
CSS gradients are drawn by the browser rather than downloaded, so they are far lighter than a background image and scale perfectly at any size. Animating one is the exception — that forces repainting, and animating a static gradient’s opacity is usually smoother than animating its colour stops.
Yes, CSS Gradient Generator is completely free. No signup, no account, and no watermark on outputs. A Pro tier is available for 100 AI ops/day and larger file sizes.
CSS Gradient Generator runs entirely in your browser. Your file is never uploaded — it is read, processed and saved locally, so it never reaches our servers or anyone else's. You can disconnect from the internet after the page loads and it still works.
Flows in a straight direction — most common for backgrounds, buttons, and headers.
background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
Best for hero sections, buttons, backgrounds. Most widely used.
Buttons · Headers · Backgrounds
Creates glows, spotlights, and highlight effects from a center point.
Glows · Spotlights · Cards
Rotates around a point — perfect for pie charts and color wheels.
Pie charts · Color wheels
Tiles the pattern — great for stripes, zebra effects, and patterns.
Stripes · Patterns · Borders
Concentric rings repeating outward — perfect for ripple effects.
Ripples · Rings · Targets
Repeating wedges around a center — pinwheels, starburst effects.
Pinwheels · Starburst · Games
6 gradient types: Linear, radial, conic, and three repeating variants — all generated as standard CSS with no vendor prefixes, supported in every modern browser.
Random generator: Produces harmonized gradients using color theory — analogous, complementary, or triadic hue schemes so the result is always visually pleasing, never jarring.
Animated mode: Adds a CSS keyframe animation to the preview using background-position. The animation code can be added to your CSS alongside the gradient for a living, breathing background.
Per-stop opacity: Each color stop has its own opacity slider, outputting rgba() values — great for glass effects, transparent fades, and overlay gradients.
Text gradients: The Text preview applies your gradient via background-clip: text — a popular technique for colourful headings.