๐ Runs in your browser โ nothing is uploadedโ Free, no signup
CSS Gradient Generator
Build linear and radial gradients visually โ pick colors, drag stops and set the angle โ then copy ready-to-use CSS.
CSS
background: #6D28D9; background: linear-gradient(135deg, #6D28D9 0%, #EC4899 100%);
The first line is a solid fallback for very old browsers.
Type
Color stops
- 0%
- 100%
Presets
When should you use the CSS Gradient Generator?
- Designing a hero or button background without an image
- Matching a gradient from a design file in CSS
- Trying color combinations quickly with live preview
How to use the CSS Gradient Generator
- 1
Pick a type
Choose linear for a straight blend or radial for a circular one.
- 2
Set the direction
Drag the angle slider for linear gradients, or choose circle or ellipse for radial.
- 3
Edit color stops
Change colors, drag positions, and add or remove stops. Or start from a preset.
- 4
Copy the CSS
Click Copy CSS and paste it into your stylesheet.
Examples
Two-color diagonal gradient
Settings
Type: linear, angle 135ยฐ Stops: #6D28D9 0%, #EC4899 100%
CSS
background: #6D28D9; background: linear-gradient(135deg, #6D28D9 0%, #EC4899 100%);
Common errors and how to fix them
The gradient doesn't show on my element- The element needs a size. Give it a height (or content) โ an empty element with no height has nothing to paint.
There's a hard line instead of a smooth blend- Two stops are at the same position. Move them apart for a smoother transition.
More from Design & Color
Free tools that run in your browser โ no signup, nothing uploaded.
Color Picker & Converter
Pick a color and convert between HEX, RGB and HSL instantly.
Color Palette Generator
Generate harmonious color palettes and export them as CSS, Tailwind or JSON.
PX to REM Converter
Convert pixels to rem and rem to pixels for any root font size.
CSS Box Shadow Generator
Design layered CSS box shadows visually and copy the CSS or Tailwind class.
CSS Border Radius & Blob Generator
Set rounded corners per side or make organic blob shapes, then copy the CSS.
Glassmorphism CSS Generator
Create frosted-glass UI cards with backdrop blur and copy the CSS.
CSS Clamp() Fluid Size Calculator
Generate clamp() values for fluid typography and spacing between two screen sizes.
CSS Text Shadow Generator
Build CSS text shadows โ soft, neon, outline or retro โ and copy the code.
JSON Auto-Fixer & Formatter
Repair, validate, and beautify broken JSON (missing quotes, trailing commas).
CSS Gradient Generator FAQ
Choose linear or radial, set the angle or shape, pick your color stops and copy the generated CSS. Paste it into the background property of any element.
A linear gradient blends colors along a straight line at the angle you choose. A radial gradient spreads out from the center as a circle or ellipse.
Each stop sets where a color is fully applied along the gradient, from 0% (start) to 100% (end). Moving two stops close together makes a sharper transition.
It's a fallback. Browsers that can't render the gradient use the solid color instead. All modern browsers support CSS gradients, so it's rarely needed but harmless.
Yes. Use an arbitrary value such as bg-[linear-gradient(135deg,#6D28D9_0%,#EC4899_100%)] โ replace spaces with underscores โ or put the CSS in a custom class.
No. Gradients are drawn by the browser, so they're usually lighter than an image and stay sharp at any size.
