
Tune offset, blur, spread and color for CSS box shadows with live preview.
Build linear or radial CSS gradients with live preview and copyable code.
Your files never leave your device. Everything runs in your browser.
CSS Gradient Generator builds a linear or radial gradient and hands you the exact CSS to paste elsewhere. Choose the type, set the angle for linear gradients, pick two colours, and the preview swatch and the code line update instantly. Five preset buttons cover common combinations.
Verified outputs from this page: the default state generates background: linear-gradient(135deg, #6366f1, #ec4899);. Switching to Radial while the angle stays at 90 gives background: radial-gradient(circle, #ff0000, #0000ff); — radial mode ignores the angle and always draws a centred circle. Setting the angle to 90 and the colours to red and blue gives background: linear-gradient(90deg, #ff0000, #0000ff);.
The generated value is an ordinary CSS background, so it works in a stylesheet rule, an inline style attribute or a design tool that accepts CSS. There is no image to export and no JavaScript needed at runtime: the browser paints the gradient itself.
Yes. Paste background: linear-gradient(...) or radial-gradient(...) into a stylesheet rule or a style attribute; it is a standard CSS value supported by current browsers with no prefixes.
A radial gradient grows from a centre point outwards, so it has no direction to rotate. The tool always emits a circle and leaves the angle field to linear mode.
The generator writes two stops for clarity. Copy its output and add more comma-separated stops in the same format — for example three colours with percentage positions — to build richer gradients.
The direction comes first, as an angle or a side keyword, then the colour stops in painting order, separated by commas: the first colour sits at the start of the line and the last at the end.
Yes. The preview rectangle and the code box are updated from the same value on every change, so what you see is exactly what gets copied.
No. The gradient is composed in your browser and the page stores nothing.
Related text tools: Box Shadow Generator, Color Converter, Color Palette Extractor.
Gradients are built locally in your browser — no colours or code ever leave the page.