CSS Gradient Generator

Create smooth transitions between two or more colors with directional control and live preview

Upload a photo to build a gradient from its colors

Gradient Type
°
Color Stops
Type a code in any format, or a CSS color name
Preset Gradients
CSS Code

            
Tap the bar to add a color, drag a stop to move it, tap a stop twice to change its color

CSS Gradient Generator: Linear, Radial and Conic

The CSS Gradient Generator makes linear, radial and conic gradients with 2 to 10 colors. Drag the color stops along the bar, set the angle or the center, or start from one of 12 presets or a random gradient. Copy the CSS, with a solid fallback color, or save the gradient as a PNG, JPG, WebP or SVG image up to 4K. You can also make a gradient from the colors of a photo. Free, in your browser.

  • Free, no watermark
  • No sign-up
  • Photos never leave your device
  • Works on phone and computer

How to Make a CSS Gradient

  1. 1 Pick a Type or a Preset

    Choose linear, radial or conic, start from one of the 12 presets, press Random, or add a photo to take its colors.

  2. 2 Set the Colors and Direction

    Click the bar under the preview to add a color, drag the stops to move them, and type any color code. Set the angle, or drag the center of a radial or conic gradient.

  3. 3 Copy the CSS or Save an Image

    Copy the CSS for your stylesheet, or choose a size and save the gradient as a PNG, JPG, WebP or SVG image.

A linear, a radial and a conic gradient

Linear, Radial and Conic

A linear gradient runs in a straight line at any angle, a radial one spreads out from a center as a circle or an ellipse, and a conic one turns around a center like a color wheel. Drag the center of a radial or conic gradient anywhere on the preview.

The twelve gradient presets

12 Presets and Random

Start from a preset such as Sunset, Ocean or Color Wheel, or press Random for 2 to 4 colors a step apart on the color wheel, neither grey nor too dark or light. Reverse flips the colors.

Desert dunes at sunset and the gradient made from themBeforeAfter

Gradients From a Photo

Add a photo and the tool turns its main colors into a gradient that runs the way they do in the photo, such as a sunset sky down to the sand. Tap a stop, then the photo, to take an exact color.

CSS Gradient Generator at a Glance

TypesLinear, radial (circle or ellipse) and conic
Colors2 to 10 stops
Presets12, plus Random
CSSA standard gradient after a solid fallback color, with no vendor prefixes
Image sizes1920 × 1080, 3840 × 2160, 1080 × 1080, 1080 × 1350, 1080 × 1920 and 1200 × 630
Image formatsPNG, JPG, WebP or SVG (a conic gradient cannot be saved as SVG)
PriceFree, with no watermark and no sign-up
Photo formatsJPEG, PNG, WebP, GIF, HEIC and other images your browser opens
Where it runsIn your browser; nothing is uploaded

Updated November 25, 2026

Frequently Asked Questions

What is the difference between linear, radial and conic gradients?

A linear gradient changes color along a straight line, at any angle: good for backgrounds, bars and buttons. A radial gradient spreads out from a center point as a circle or an ellipse, like a spotlight or a glow. A conic gradient turns around a center point like the hands of a clock, for color wheels and pie-like designs.

How do I add multiple colors to my gradient?

Click Add Color, or click the bar under the preview: a new stop appears there in the color the gradient already has, so nothing jumps. Drag a stop along the bar to move it or type its position, and set its color with the swatch or a code in any format. A gradient takes 2 to 10 colors; the × removes one.

Are the generated gradients compatible with all browsers?

Yes. Linear, radial and conic gradients work without prefixes in every current browser: Chrome, Edge, Firefox, Safari and their mobile versions. The CSS starts with a solid color, the gradient's average, so a very old browser that cannot draw gradients still shows a matching background.

Can I save or export my gradient designs?

Copy the CSS, or save the gradient as an image: PNG, JPG, WebP or SVG, in six sizes from 1200 × 630 to 4K (3840 × 2160), for wallpapers, slides and social posts. The image is drawn with the same geometry as the CSS, so it matches the preview. SVG cannot hold a conic gradient, so a conic one saves as PNG, JPG or WebP.

How do I control gradient direction and angle?

For a linear gradient, drag the angle slider, type the degrees (0-359) or use the eight arrows: 0° runs from bottom to top, 90° from left to right. For a conic gradient the angle sets where the colors start. For radial and conic gradients, drag the center point on the preview, or move it with the arrow keys; a radial gradient can be a circle or an ellipse.

Can I make a gradient from the colors of a photo?

Yes. Upload a photo and the tool builds a gradient from its main colors, laid in the direction they lie in the photo: a sky above the sea gives a top-to-bottom gradient. Then tap a stop and tap the photo to pick its color exactly; the next stop is chosen for you.

How do I create smooth color transitions in my gradients?

Use colors of similar brightness, or add an in-between color between two contrasting hues so the middle does not turn gray. Space the stops evenly for a smooth blend, or put two stops at the same position for a hard edge.

Make Your Gradient