CSS gradient generator
Design a background gradient and copy the CSS. Pick linear, radial or conic, set the angle or centre, and add as many colour stops as you like, each with a colour picker or any CSS colour such as hex, rgb, hsl or a name, and an optional position. Turn on repeating for stripes and rings, and choose an interpolation colour space such as oklch for smoother, brighter blends. The live preview shows exactly what the CSS draws.
Type
Blend in
How to use the CSS Gradient Generator
- 1
Choose the type
Linear, radial or conic.
- 2
Set the direction
Angle for linear and conic, centre for radial and conic.
- 3
Edit the colour stops
Pick colours and positions; add or remove stops.
- 4
Copy the CSS
The rule includes a solid colour fallback.
When to use it
- Create hero and button backgrounds.
- Make striped or ringed patterns with repeating gradients.
- Try oklch blends that avoid muddy middles.
Limits
- Interpolation spaces such as oklch need a current browser; older browsers use the solid fallback.
- Stops without a position are spaced evenly by the browser.
- Colours with transparency are kept as rgb with alpha.
Privacy
Everything runs in your browser. Nothing is uploaded or stored.
Frequently asked questions
What is the difference between linear, radial and conic?
Linear blends along a line, radial spreads out from a centre point, and conic sweeps around a centre like a colour wheel.
What does in oklch do?
It blends colours in the OKLCH colour space, which keeps brightness even and avoids the grey middle you get between some colours in sRGB.
Which browsers support it?
Linear, radial and conic gradients work in all current browsers. Interpolation spaces are supported in current Chrome, Edge, Safari and Firefox.
How do I make hard stripes?
Give two stops the same position, or turn on repeating with stops close together.
Why is there a solid background line?
It is a fallback for browsers that can’t draw the gradient.
Related tools
People also use
- JWT Generator & SignerCreate and sign JSON Web Tokens with HMAC, RSA or ECDSA keys, entirely in your browser.
- Base64 Encoder & DecoderEncode and decode Base64 and Base64url, text or files.
- URL Encoder & DecoderPercent-encode or decode URLs and see their query parameters.
- CSV to JSON ConverterConvert CSV ⇄ JSON with correct quoting, types and nested data.
Last updated November 22, 2026 · How we build and test our tools