Design Tools

CSS Gradient Generator

Build linear, radial and conic CSS gradients visually: 2 to 5 color stops, 8 curated presets, a large live preview, copyable CSS and Tailwind classes, PNG and SVG downloads, and share links, all in your browser.

Your headline looks like this on the gradient

Dark gradient: light text reads best on it.

0%
100%

The link encodes this exact gradient, so anyone opening it sees the same design.

Privacy: gradients are built on your device. Nothing is uploaded, stored or sent to any server.

More tools for makers: Hex to RGB Converter · Image Compressor

How this calculator works

A CSS gradient blends two or more colors along a line, a circle or a full rotation, and it is the fastest way to give a page, a banner or a social post a modern background without an image file. This generator builds the CSS for you: pick linear, radial or conic, drag the color stops into place, and copy the finished code. Everything runs in your browser, so there is no upload, no account and no watermark, and the result is a few lines of plain CSS you can paste anywhere.

The three types cover different jobs. Linear gradients run in a straight direction, set by an angle or one of eight direction presets, and they are the workhorse for headers, buttons and hero sections. Radial gradients spread outward from a point, as a circle or an ellipse, which suits glows, spotlights and soft vignettes. Conic gradients rotate around a center point, which is how pie charts, color wheels and rotating borders are made. Each type shares the same stop editor: 2 to 5 colors, each with a color picker, an exact HEX field and a position slider, plus 8 curated presets like sunset, ocean and royal when you want a good-looking result in one click.

Two details make a gradient usable rather than just pretty. First, the tool always emits a background-color fallback line using the first stop, so older browsers still show a solid color instead of nothing. Second, the contrast note under the preview tells you whether dark or light text reads better on your gradient, which matters the moment you put a headline on top of it. For production use, copy the Tailwind arbitrary-value class instead of raw CSS, download a 1200 x 630 PNG for social sharing images, or grab the standalone SVG when you need the gradient as a file.

Frequently asked questions

How do I create a linear gradient in CSS?
Pick Linear, set the angle with the slider or a direction preset, then adjust the color stops. The tool outputs code like background: linear-gradient(135deg, #FF512F 0%, #DD2476 100%); plus a background-color fallback line using the first color.
What is the difference between linear, radial and conic gradients?
Linear blends colors along a straight line at an angle. Radial spreads them outward from a point, as a circle or ellipse. Conic rotates them around a center point, which is what pie charts and color wheels use. All three are plain CSS with no image file.
How many colors can a gradient have?
This generator supports 2 to 5 color stops. Two stops give a clean blend; adding middle stops creates multi-color transitions, for example a sunset that passes through orange, pink and purple. Each stop has its own position slider, so a color can dominate or appear as a thin band.
How do I use a gradient with Tailwind CSS?
Copy the Tailwind class from the tool, for example bg-[linear-gradient(135deg,_#FF512F_0%,_#DD2476_100%)]. It is an arbitrary-value class, so it works in Tailwind v3 and v4 without any config change: paste it wherever you would use a normal background class.
Can I download my gradient as an image?
Yes. Download a 1200 x 630 PNG, the standard social sharing size, or a standalone SVG file. The PNG is rendered in your browser from the same gradient, and the SVG works as a regular image file or inline in HTML.
Will my gradient work in older browsers?
The copied CSS includes a background-color fallback line with the first stop color, so browsers without gradient support still show a solid color. Modern browsers from the last decade all support linear, radial and conic gradients natively.
Disclaimer: Results are estimates for planning purposes only and are not financial advice. Actual loan terms, taxes and investment returns vary. Consult a qualified professional before making financial decisions.