About this tool
A CSS gradient is a small programme: a direction, and a list of colours pinned to positions along it. This generator gives that programme a visual editor — colour stops you add and arrange, an angle dial for linear gradients, shape and position for radial ones — and a live preview big enough to judge. When it looks right, the exact background declaration is written out for copying into your stylesheet.
The craft is in the stops. Two colours at 0% and 100% give the classic blend; a third stop in the middle adds a glow or a band; two stops at the same position create a hard edge — the trick behind striped backgrounds and split designs. Positions are optional per stop: leave them to the browser's even spacing, or pin them when the design needs the colour change at an exact point.
How to use it
- Choose linear or radial; set the angle, or the shape and position.
- Add colour stops and set each colour and position.
- Copy the generated CSS from the result panel.
Good to know
- Subtle gradients age better: two neighbouring hues at low contrast look designed; rainbows look like 2009.
- For a hard two-tone split, set two stops to the same position (e.g. both 50%).
- Always set a solid background-color fallback under a gradient for ancient browsers — use the first stop's colour.
Frequently asked questions
Can I make a gradient with more than two colours?
Yes — add as many stops as the design needs; each becomes one line in the CSS.
Why does my gradient look banded?
Very gradual blends across similar colours can band on some displays. A touch more contrast between stops, or a mid stop, usually smooths it.
Is the CSS ready for production?
Yes — it is a standard background declaration that works in every modern browser.
More Developer tools
JSON Formatter & Validator
Pretty-print messy JSON, minify it back, and get a precise error location when it will not parse.
JSON to CSV
Turn a JSON array of objects into a clean spreadsheet-ready CSV, columns and escaping handled.
CSV to JSON
Convert spreadsheet CSV into a JSON array — quoted fields, embedded commas and all.
XML Formatter
Indent and validate XML — sitemaps, feeds, config files — with errors pointed at the guilty tag.
JS / CSS / HTML Beautifier
Untangle minified or messy code into readable, consistently indented JavaScript, CSS or HTML.
JS / CSS Minifier
Strip comments and needless whitespace from JavaScript and CSS — smaller files, same behaviour.
Making videos too? Try our YouTube SEO Checker, or browse the full Toolkit and the free YouTube tools.