Black Friday: 50% off every paid plan with code BF50. Ends 5 December.

See prices

Free tool

CSS gradient generator, copy the code.

Pick linear, radial or conic, add as many colour stops as you like, type a HEX code (see-through too) or slide them into place, set the angle or the centre, reverse or roll a random blend, and copy the CSS or a Tailwind class. The preview updates as you go, your last gradient is kept in this browser, and Copy link opens the same gradient anywhere.

Need a custom tool, app or website? Contact us 

        

Colour stops

Type a HEX code with two more digits for see-through, like #7c52ff80, or transparent.

Presets

Made in your browser. Nothing is sent anywhere.

Three kinds

Linear, radial, conic.

01 / Linear

Along a line

Colours blend along an angle: 90 degrees is left to right, 180 is top to bottom.

02 / Radial

From the centre

Colours spread out in a circle or an ellipse.

03 / Conic

Around a point

Colours sweep around the centre like a colour wheel or a pie.

Guide

How to make a CSS gradient, and read the code it gives you.

A CSS gradient generator builds the code for a smooth blend of colours that you can use as a background on any web page element, with no image file to load. This one makes linear, radial and conic gradients with as many colour stops as you need, shows a live preview, and gives you one background line to copy. Your last gradient stays in this browser, so you can come back to it.

How to use the CSS gradient generator

  1. Pick a Type: Linear, Radial or Conic.
  2. For linear and conic, drag the Angle slider. For radial, pick Circle or Ellipse under Shape. Radial and conic also have a Centre, like Middle or Top left.
  3. Under Colour stops, click a swatch or type a HEX code to change its colour, and drag its slider or type a number to move it along the gradient. Eight-digit HEX codes like #7c52ff80, and transparent, make a stop see-through.
  4. Press Add a colour for another stop, or the cross to remove one. A gradient keeps at least two.
  5. Or click one of the Presets to start from a ready blend, Random for a new one, or Reverse to flip the order. Start again goes back to the first gradient.
  6. Choose Code as CSS or Code as a Tailwind class, and press Copy code. Copy link copies an address that opens this exact gradient, to share or to come back to.

Reading the code

The default gradient gives you this:

background: linear-gradient(135deg, #7c52ff 0%, #f15bb5 55%, #fee440 100%);

  • 135deg is the direction the colours travel. Here they go from the top left towards the bottom right.
  • #7c52ff 0% is the first stop: violet at the very start.
  • #f15bb5 55% puts pink a little past the middle, so the violet to pink part is longer than the pink to yellow part.
  • #fee440 100% ends on yellow.

The tool always writes the stops in order of position, even if you added them in a different order.

Which angle goes which way

AngleLinear gradient runsConic gradient starts
0°Bottom to topAt the top
90°Left to rightAt the right
135°Top left to bottom rightBetween right and bottom
180°Top to bottomAt the bottom
270°Right to leftAt the left

On a box that is not square, 135° is not exactly corner to corner. If you need the blend to hit the corners on any shape, change 135deg to to bottom right by hand after you paste.

Linear, radial or conic

  • Linear is the one for most backgrounds: hero sections, buttons, cards and headers.
  • Radial spreads out from the centre. Circle keeps a round shape, Ellipse stretches to fit the box. A light colour in the middle fading to a darker one at the edge gives a soft spotlight.
  • Conic sweeps around the centre, clockwise from the angle you set. Use it for colour wheels, pie charts and loading rings. To avoid a hard seam where the sweep ends, make the last stop the same colour as the first.

Tricks with colour stops

  • Hard lines. Move two stops to the same position and the blend turns into a sharp edge. Red at 50% and blue at 50% gives a half red, half blue box.
  • Even spacing. Presets spread their stops evenly. If a blend looks muddy in the middle, slide the middle stop or add a brighter one between.
  • Calmer gradients. Colours close to each other on the colour wheel, like blue to teal, blend cleanly. Opposite colours, like orange to blue, can pass through grey in the middle.

Fallback colour and Tailwind

Tick Solid colour first, as a fallback to put a plain background line above the gradient, using the first stop's colour. A browser that cannot draw the gradient keeps the solid colour, and text on top stays readable while the page loads.

Code as a Tailwind class writes the gradient as one arbitrary value, like bg-[linear-gradient(135deg,#7c52ff_0%,#fee440_100%)], with underscores where the spaces were. Tailwind's docs list bg-[<value>] as setting background-image to that value (Tailwind CSS, checked 18 Oct 2026).

Using it in your code

Paste the line inside any rule, for example .hero { background: linear-gradient(...); }. For gradient text, add these three lines next to it: -webkit-background-clip: text;, background-clip: text; and color: transparent;. To keep a solid colour for anything that cannot show the gradient, put background-color with one of your colours just above the gradient line.

Need the gradient as a picture file instead? Use the gradient background maker. To pick colours that go well together, try the colour palette generator, and for a shadow under the same card, the box shadow generator.

Questions

Good to know.

How do I make a CSS gradient?

Pick the type, set the colours and angle, then press Copy code and paste it into your stylesheet.

How many colours can a gradient have?

As many as you like. Press Add a colour.

Do all browsers support these?

Linear, radial and conic gradients work in every current browser.

Can I use it as a picture?

For a PNG or JPG background, use the gradient background maker.

Is it saved?

Your last gradient is kept in this browser.

How do I add a gradient to text in CSS?

Copy the gradient here, then add -webkit-background-clip: text;, background-clip: text; and color: transparent; to the same rule. The gradient then shows only through the letters.

Why does my gradient look banded?

Banding shows when two close colours stretch over a large area, so there are few shades to fill it. Pick colours a little further apart, or add a middle stop, to give the blend more steps.

Can I make a see-through gradient?

Yes. Type an eight-digit HEX code in a stop, like #7c52ff00 for fully clear or #7c52ff80 for half, or type transparent. The code then uses an rgba() colour for that stop.

What is the difference between 90deg and to right?

Both run left to right. The difference shows on diagonals: an angle keeps the same slope on any box, while a keyword like to bottom right always aims at the corner.

Listed on

Listed on JustMacAppsMotionShine on Mac App IndexMotionShine on ScrollLaunchMotionShine featured on StartupBaseFeatured on FazierFeatured on Twelve ToolsMotionShine - Featured on Smol Launch