CSS gradient generator
Design linear, radial or conic gradients and copy the CSS.
Colour stops
Made in your browser. Nothing is uploaded.
About the CSS Gradient Generator tool
This CSS gradient generator builds a background gradient from 2 to 6 colour stops and gives you the CSS to copy. Choose linear (with an angle from 0 to 360°), radial (circle or ellipse) or conic, drag each stop's position, tick Repeating for stripes, and see the result live. The code starts with a solid fallback colour, for example background: #4f46e5; followed by the gradient line, so very old browsers still show a colour.
At a glance
- Types
- Linear, radial (circle or ellipse) and conic; optional repeating
- Colour stops
- 2 to 6, positions 0–100%
- Angle
- 0–360°
- Output
- background CSS with a solid fallback colour
- Price
- Free, no sign-up
- Works in
- Your browser, on phone or computer. Works offline after the first visit.
- Privacy
- What you type never leaves your device.
How to make a CSS gradient
- Choose Linear, Radial or Conic and set the angle or centre.
- Pick colours and drag their positions; add up to 6 stops.
- Press "Copy CSS" and paste it into your stylesheet.
Private
Your text stays in your browser and is never sent to a server.
Instant
Results update as you type, with nothing to install.
Free
No sign-up, no limits and no ads inside your writing space.
CSS Gradient Generator: frequently asked questions
What does the angle in linear-gradient mean?
0deg goes from bottom to top, 90deg from left to right and 180deg from top to bottom. 135deg runs from the top-left corner to the bottom-right.
Do CSS gradients work in all browsers?
linear-gradient and radial-gradient work in every current browser, and conic-gradient works in current Chrome, Edge, Firefox and Safari. The first line of the CSS gives a solid colour for very old browsers.
How do I make a hard colour edge instead of a blend?
Put two stops at the same position, for example red 50% and blue 50%. The colour then switches sharply at the halfway point.
How do I make a striped background with a CSS gradient?
Tick Repeating and use hard edges. With the stops #4f46e5 0%, #4f46e5 10%, #ffffff 10% and #ffffff 20%, the 20% pattern repeats 5 times across the box, giving 10 stripes.



