Skip to main content
Free Tools

CSS gradient generator: build linear, radial & conic gradients

Design a gradient visually with a live preview, unlimited color stops, and angle control - then copy production-ready CSS or a Tailwind class. Free, runs in your browser.

No signup requiredLinear, radial & conicCSS & Tailwind output

Color stops

0%
100%

Presets

background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);

Building a UI from scratch?

We design and build fast, polished web apps and sites - gradients, design systems, and all.

Talk to an engineer about this

CSS gradients are one of the highest-impact, lowest-cost design touches you can add to a site: they're rendered by the browser, weigh nothing, scale to any screen, and never pixelate. This generator lets you build linear, radial, and conic gradients visually and copy clean code - so you skip the trial-and-error of hand-writing color stops and angles.

What this tool builds

Three gradient types

Linear, radial, and conic - with angle and position control.

Multiple color stops

Add, recolor, and position stops for rich multi-color blends.

CSS & Tailwind output

Copy a standard CSS rule or a Tailwind arbitrary-value class.

Presets & randomizer

Start from a curated preset or shuffle for inspiration.

How to create a CSS gradient

  1. Choose the type - linear, radial, or conic.
  2. Set your colors - add stops, pick colors, and position them; adjust the angle for linear/conic.
  3. Preview live or start from a preset.
  4. Copy the code - CSS or Tailwind - into your stylesheet.

Gradient syntax cheatsheet

CSS gradient syntax by type
TypeExampleBest for
Linearlinear-gradient(90deg, #667eea, #764ba2)Backgrounds, buttons, hero sections
Radialradial-gradient(circle, #fceabb, #f8b500)Spotlights, glows, vignettes
Conicconic-gradient(from 0deg, #ff0080, #7928ca)Color wheels, pie charts, angular accents

For the full specification, see MDN's CSS gradient reference.

CSS gradients vs image gradients

Always reach for CSS first. A CSS gradient adds zero network weight, scales perfectly on any screen including retina, never blurs, and can be animated or re-themed with CSS variables. An image gradient adds an HTTP request and file size, can pixelate, and is a pain to tweak. Reserve images for textures and effects that CSS genuinely can't reproduce.

Keeping text readable on gradients

A gradient that looks great can still make text unreadable where the background gets light. Check contrast against both the lightest and darkest points of the gradient - aim for a WCAG ratio of at least 4.5:1 for body text. If a gradient is too busy behind text, add a semi-transparent overlay or shift the text to a calmer area. Verify specific pairs with our brand color & contrast checker.

Frequently asked questions

What is a CSS gradient generator?
A visual editor for linear, radial, and conic gradients that outputs copy-ready CSS or Tailwind code.
Linear vs radial vs conic?
Linear blends along a line, radial blends outward from a center, conic sweeps around a center like a clock face.
How do I create a CSS gradient?
Pick a type, add color stops with positions, set an angle if needed, and copy the generated rule into your background property.
How do I add a gradient in Tailwind?
Use the built-in gradient utilities, or an arbitrary value like bg-[linear-gradient(...)] with underscores for spaces - which this tool outputs.
Can I use more than two colors?
Yes - add multiple stops and position each one. Two or three usually look cleanest.
CSS gradient or image?
CSS - it's weightless, scalable, and editable. Use images only for effects CSS can't produce.
How do I keep text readable?
Check contrast against the lightest and darkest points; aim for 4.5:1, and add an overlay if needed.
Is it free?
Yes - free, no signup, runs entirely in your browser.

Related design tools

Launch Faster

Ready to build your next product?

Tell us what you're building. A senior engineer will help you scope it, plan it, and get it built fast, on a foundation that's ready for real users.

Talk to real engineers
A clear plan after one call
No obligation