Home  /  Developer Tools / CSS Gradient

CSS Gradient Generator

Build a linear, radial, or conic gradient with a live preview, then copy the exact CSS or download it as a PNG.

CSS Gradient Generator Tool

135 degrees

Presets:

The CSS shown is exactly the CSS for the preview above. Paste the background rule into your stylesheet. The PNG download renders the same gradient as an image.

A CSS gradient is a smooth blend between two or more colours, painted by the browser from code instead of loaded as an image file. It is used for hero banners, buttons, cards, and backgrounds, and it stays sharp at any screen size because there is no image to stretch.

How to Use This Tool

  1. Pick a gradient type: linear for a straight blend, radial for a glow from the centre, or conic for a blend around a point.
  2. Choose your colours: pick two colours, or add a third colour stop for a richer blend.
  3. Set the angle: rotate a linear or conic gradient until the preview looks right.
  4. Copy the CSS: paste the background rule into your stylesheet, or download the gradient as a PNG image.

Sample CSS

A linear gradient at 135 degrees from purple to light lavender looks like this in CSS: background: linear-gradient(135deg, #5C27FE 0%, #DEC7FF 100%); The tool writes this code for you, with your own colours, stops, and angle, so you never have to guess the syntax.

Why Use This Tool

Writing gradients by hand means guessing angles and stop positions, saving, refreshing, and repeating. This generator removes that cycle: every change redraws the preview at once, and the code below the preview is always the exact code for what you see.

Frequently Asked Questions

Yes. It is free, needs no sign up, and runs in your browser.

Linear, radial, and conic gradients, with two colours or an optional third colour stop.

Yes. The PNG download renders the same gradient at 1200 by 800 pixels. Conic PNG export needs a browser that supports conic canvas gradients.

The CSS shown works in all modern browsers. Very old browsers fall back to a flat colour, so set a background colour first if you must support them.

No. All colour and angle values stay in your browser. Nothing is sent to a server.

Yes. Colour pickers, angle slider, and copy button all work in a modern mobile browser.