CSS Gradient Generator

Build CSS gradients visually.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Choose two colours and a type, and copy the CSS gradient value. Linear gradients run top to bottom; radial gradients are circles. This is a simple two-stop generator.

How to use

1
Step 1
Pick linear or radial.
2
Step 2
Enter the two colours.
3
Step 3
Press Generate and paste the value into a background property.

How it works

The tool writes a gradient with a colour at 0% and another at 100%. Linear output is linear-gradient(180deg,...), which goes from the top edge to the bottom. Radial output is radial-gradient(circle,...), which goes from the centre outwards. Any valid CSS colour string works.

Worked example

A dark to light linear gradient

Input
Linear, #111827 to #f3f4f6
Output
linear-gradient(180deg, #111827 0%, #f3f4f6 100%)
Walkthrough
Use it as background: linear-gradient(180deg, #111827 0%, #f3f4f6 100%);

Limitations

  • Exactly two colour stops, at 0% and 100%.
  • The angle is fixed at 180deg. Edit it in the output for diagonal or horizontal gradients.
  • No conic gradients and no live preview.

Questions

How do I make a CSS gradient?
Pick two colours and a type, press Generate and copy the value into your background.
How do I change the gradient direction?
Edit the angle in the output; 90deg goes left to right, 0deg goes bottom to top.
Can I add more colour stops?
Not in this tool. Add them to the generated value by hand.
Does it support radial gradients?
Yes, as a circle from the centre.

Features

  • Linear and radial
  • Copy-ready value
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Learn JSON - Full Crash Course

    freeCodeCamp.org

    JSON is the payload format behind many developer tools here.

    Watch on YouTube
  • TypeScript in 100 Seconds

    Fireship

    Typed JS snippets often get formatted or hashed nearby.

    Watch on YouTube