- All tools
- CSS gradient generator
How do I create a CSS gradient and copy the code?
Pick linear, radial or conic, set the angle or position, edit the colour stops, and the page shows a live preview and the matching CSS, ready to copy. You can start from one of 12 presets, randomise, switch to repeating gradients, choose HEX, rgba or hsl output, or paste an existing gradient to load its stops and edit it.
- Choose linear, radial or conic and set the angle or position.
- Edit the colour stops, or start from a preset or Randomise.
- Copy the CSS into your stylesheet.
Top: the gradient in a box. Bottom: the same gradient stretched as a page-wide strip.
Repeats the stops; works best when the last stop is below 100%.
Colour stops (2–8)
Presets
CSS
Load an existing gradient
What this page can do
- Linear gradients with an angle, a dial or a direction keyword
- Radial gradients with shape, size and position, and conic gradients with a start angle and position
- 2 to 8 colour stops with opacity, position, reorder, reverse and even spacing
- 12 presets, a Randomise button and repeating gradients
- CSS output in HEX, rgb() or hsl(), with an optional fallback colour line
- Paste an existing gradient to load its stops and keep editing
When to use this page
- Making a hero, button or card background without writing the syntax by hand.
- Taking over a gradient from a stylesheet or a design file and adjusting it.
- Trying colour combinations quickly with presets and Randomise.
When to use something else
- You need gradients in OKLCH or another colour space; this page writes sRGB gradients only.
- You need to read gradients that use var(), calc() or colour-mix(); the paste box does not understand them.
- You want to export an image or SVG; this page produces CSS text only.
How it compares with other options
Browser developer tools let you tweak a gradient on an element that already exists, and many design tools can copy a gradient as CSS. This page is for building one from scratch with a live preview and for loading a gradient you already have, with no software to install. It writes standard CSS that browsers blend in sRGB, so what you see here is what a normal stylesheet will show. The preview is drawn by your own browser, so it also shows how your browser handles the syntax.
Where your data goes
Nowhere. Everything is computed by your own browser. Nothing you type or paste is sent to a server, logged or stored — close the tab and it is gone. You can check it yourself: open your browser’s network panel — the page still loads its own code and any ads, but no request carries what you typed.
Questions about this tool
Can I edit a gradient I already have?
Yes. Paste a linear-gradient(), radial-gradient() or conic-gradient() (also the repeating versions) into the paste box and press Load. Stops with HEX, rgb(), rgba(), hsl(), hsla() or a colour name are read. If the syntax is not understood — for example var() values, calc() positions or colour-mix() — the page says so instead of guessing.
Why can the same gradient look different in another tool?
Browsers blend gradient colours in sRGB by default. Tools that interpolate in OKLab or OKLCH, or CSS using the “in oklch” keyword, give smoother or more vivid transitions between some colours, so the result can differ. This page writes standard sRGB gradients that every browser understands.
Do conic gradients work in all browsers?
conic-gradient() works in current Chrome, Edge, Safari and Firefox. Very old browsers, roughly those from before 2020, do not support it and ignore the rule. That is why the page can add a plain fallback colour line before the gradient line.
What does the fallback line do?
Browsers that do not understand a gradient skip the whole declaration. A background: line with a solid colour placed before it gives them something sensible to show, while modern browsers use the gradient that follows. The page uses your first colour stop.