CSS Gradient Generator
Build CSS gradients visually with live preview. Linear, radial, and conic with multiple color stops. Copy CSS instantly.
Runs in your browser. No data leaves your device.
About this tool
A visual editor for CSS linear, radial and conic gradients that outputs a ready-to-paste background declaration. Pick colors and stop positions, watch the live preview, and copy the CSS. For front-end developers and designers building backgrounds.
Features
- Three types: linear-gradient, radial-gradient (circle) and conic-gradient
- Angle slider 0-360 deg for linear (direction) and conic (start angle)
- Direction presets for linear: To Right, To Left, To Bottom, To Top, To Bottom Right, To Top Left
- 2 to 6 color stops, each with a color picker and a 0-100% position slider
- Color picker accepts hex, rgb, hsl, oklch or color names, with eyedropper where the browser supports it
- 10 preset gradients (Sunset, Ocean, Fire, Purple Haze, Emerald, Midnight, Cotton Candy, Aurora, Peach radial, Rainbow Cone conic)
- Live preview panel
- Copy and pipeline buttons for the generated CSS
How to use it
- Pick Linear, Radial or Conic
- Set the angle or click a direction preset
- Edit stop colors and positions; use + Add Stop for up to 6
- Copy the background: ... line from the code box
Inputs
- Colors via the picker, positions in whole percent, angle in whole degrees
Outputs
- A single CSS declaration, e.g. background: linear-gradient(90deg, #6366f1 0%, #ec4899 100%);
Limits and notes
- Radial is always a centered circle -- no ellipse, size or position controls
- Stops are written sorted by position (the editor list keeps its own order), so a stop added at 50% shows in the middle
- Single background declaration only; no vendor prefixes, fallbacks or repeating gradients
- The gradient is not saved and resets on reload; the color picker reads the shared recent-colors list (overtooled:color-picker:recent) and picker mode (overtooled:color-picker:mode)
- Runs entirely in the browser
Frequently Asked Questions
How does the CSS Gradient Generator work?
The tool builds a CSS background property string by combining your selected gradient type (linear-gradient, radial-gradient, or conic-gradient), direction/position, and color stops with their percentage positions. The live preview applies this CSS string directly to a div element's style. Adding, removing, or repositioning color stops regenerates the CSS string in real time.
What gradient types can I create?
Linear (with a 0-360 degree direction and quick direction presets), radial (a circle spreading from the center) and conic (colors sweeping around the center, with an adjustable start angle). Radial shape, size and position are not adjustable.
Can I add more than two colors?
Yes, up to six color stops. Each stop has its own color picker and a position slider from 0 to 100%. You can remove stops down to a minimum of two.
How do I use the generated CSS?
Copy the CSS code with one click and paste it into your stylesheet. The output is a standard CSS background property that works in all modern browsers.