CSS Gradient Generator
Build linear, radial, and conic CSS gradients visually — drag stops, pick presets, copy the CSS. Free, in your browser.
Gradient type
CSS
Presets
- 0%
- 100%
Stays in your browser.
The preview renders the CSS directly with no canvas, no server. Your color choices and saved gradient live in localStorage on your device.
How to use it
- 1Pick a gradient type — linear (angle), radial (shape + position), or conic (start angle + position).
- 2Click a preset to start fast, or build from scratch by adjusting color stops below.
- 3Each color stop has a hex color and a position from 0 to 100. Add as many as you need with the + Add button; minimum two.
- 4The preview updates live. Click Copy CSS to grab the ready-to-paste declaration.
Common use cases
- Build a hero or call-to-action background for a landing page without firing up Figma.
- Prototype a brand palette quickly by tweaking color stops in the preview.
- Generate the conic gradient for a color wheel, donut chart, or progress indicator.
- Recreate a gradient from a screenshot — paste your hex codes into stops and tune positions until it matches.
- Save a project gradient to localStorage as a working scratchpad while you design.
Frequently asked questions
- Is my work uploaded anywhere?
- No. The preview is a plain CSS background rendered by the browser — there's no canvas, no server, no third-party API. Your gradient state lives in localStorage on your device so the page picks up where you left off.
- What's the difference between linear, radial, and conic?
- Linear runs colors along a straight axis you set with an angle. Radial radiates outward from a point (the position) in a circle or ellipse. Conic sweeps around a point like the colors on a color wheel — handy for donut charts, progress rings, and decorative effects.
- How do color stops work?
- Each stop is a color anchored at a percentage of the gradient's length (0 to 100). Between two stops, the colors interpolate. Add more stops to control transitions — a third stop in the middle, for instance, makes the gradient bend through that color rather than going straight from start to end.
- Does the generated CSS work in every browser?
- linear-gradient and radial-gradient have been supported in every browser for years. conic-gradient is supported in Chrome, Edge, Firefox, and Safari since 2021. For Internet Explorer support, use a fallback solid color above the gradient declaration.
- Can I copy just the value, without the `background:` prefix?
- The CSS textarea outputs both forms (one with the `background:` prefix, one with `background-image:`). Select the part you want and copy — both work. If you only want the gradient function itself, copy from the opening keyword (linear-gradient, etc.) to the closing parenthesis.
- Why does my conic gradient look pixelated?
- Conic gradients are rendered as bitmaps in some browsers, so very large gradients at small angles can show banding. Adding more intermediate stops or using a smaller container usually smooths it. The CSS itself is fine — the rendering is the limitation.
Try next
Box Shadow Generator
Build CSS box-shadows visually with offset, blur, spread, opacity, and inset across stacked layers. Live preview, copy-ready CSS.
HTML, CSS & JS Minifier
Minify HTML, CSS, and JavaScript online — strip comments, collapse whitespace, and see byte-size savings. Runs entirely in your browser.
Color Converter
Convert colors between HEX, RGB, HSL, HSV, and OKLCH, and generate tint, shade, and harmony palettes. Free, in your browser.