CSS Gradient Generator

Preview as you change the colors and angle, then take the CSS code or a PNG.

Loading the tool...

When to use it

How to use

  1. Click a ready-made color preset or pick your own colors.
  2. Change the type and angle.
  3. Press Copy CSS or Save PNG.

How it works

The gradient is generated as standard CSS (linear, radial or conic) and previewed live, and the PNG download is rendered on a canvas in your browser. No server or library is involved and nothing is saved.

For privacy-sensitive images, the processing happens in your browser, so your files stay on your device and are not uploaded to a server. How to verify. Developers can also make CSS gradients with the REST API (gradient-css; free tier with usage limits, request contents are processed in memory and not stored).

FAQ

Where do I paste the CSS code?

Paste it into your web page's style (the background property).

Is anything uploaded?

No. The gradient and PNG are created in your browser and nothing is sent or saved.

How many colors can I use?

Up to 5 in one gradient, and each color has a position from 0 to 100%.

What is the difference between linear, radial and conic?

Linear flows in one direction, radial spreads from the center outward and conic sweeps around the center. Linear and conic use an angle.

How big is the PNG?

It is fixed at 1920×1080 pixels. In some browsers conic PNG saving is not available, but the CSS code still works.

Can the gradient be transparent?

No. Colors are picked as opaque colors.

Is there a quick way to get ideas without picking colors by hand?

Yes. Click one of the 12 color-pair presets, or press 「Random」 to get two random colors with a random angle. You can then fine-tune the colors and copy the CSS.

How do I remove a color I added?

Once a gradient has more than two colors, each color row shows a 「Remove」 button. A gradient needs at least two colors, so the button disappears when only two are left, and the maximum is five.

Which way does the angle point?

In CSS, 0deg points up and larger angles rotate clockwise, so 90deg runs toward the right and 180deg toward the bottom (MDN, linear-gradient). Radial gradients have no angle slider here.

Can I make a wallpaper at my phone size or save a JPG?

No. 「Save PNG」 always makes a 1920×1080 PNG and there is no JPG option. For another size, copy the CSS, or resize the PNG with Image Resizer using 「Custom size」; remember that Fill crops and Stretch distorts.

Related guides

More free tools