CSS Gradient Generator

Build linear, radial, and conic CSS gradients visually. Add color stops, adjust the angle, choose a gradient type, and see a live preview update as you go. Copy the generated CSS with one click — everything runs in your browser, nothing is sent to a server.

Type
Angle
90°
Repeating
Color Stops
Generated CSS
Presets
❤️ Support CodeConverter.net and donate ❤️

Everything you need to know about CSS Gradients

What is a CSS gradient?

A CSS gradient is a smooth transition between two or more colors rendered entirely by the browser — no image file required. Gradients are defined using CSS functions such as linear-gradient(), radial-gradient(), and conic-gradient(), and can be used anywhere an image is expected: backgrounds, borders, masks, and even list markers.

Because they are drawn by the browser at display resolution, gradients scale perfectly on retina screens, load instantly (zero HTTP request), and can be animated or transitioned with CSS. Color stops control exactly where each color starts and ends, giving you precise control over blends, hard lines, and everything in between.

Linear gradients
  • Colors blend along a straight line at a given angle
  • Use to right, to bottom, or a specific degree like 135deg
  • Most commonly used for hero backgrounds and UI elements
  • Hard stops (same position twice) create sharp color transitions
Radial gradients
  • Colors radiate outward from a center point
  • Choose between circle and ellipse shapes
  • Great for spotlight effects and glowing UI elements
  • Position with at center, at top left, or pixel offsets
Conic gradients
  • Colors sweep around a center point like a clock
  • Perfect for pie charts, color wheels, and spinners
  • Supported in all modern browsers (Chrome, Firefox, Safari)
  • Set a starting angle using the from keyword
How to use this tool
  • Pick a gradient type: Linear, Radial, or Conic
  • Adjust colors and positions in the Color Stops panel
  • Drag the angle slider or choose a preset to get started fast
  • Click Copy CSS to copy the output to your clipboard
Repeating gradients
  • repeating-linear-gradient() tiles the pattern infinitely
  • Great for stripes, checkerboards, and hatching patterns
  • Use pixel or percentage stop positions to control tile size
  • Toggle the Repeating switch in this tool to enable it
Color stop syntax
  • Stops accept any CSS color: hex, rgb(), hsl(), or named
  • Positions are percentages (0%100%) or length values
  • Omitting the position distributes stops evenly
  • Alpha/transparency is supported via rgba() or #rrggbbaa

Performance tips for CSS gradients

CSS gradients are GPU-accelerated in modern browsers and produce zero network requests, making them significantly faster than background images for simple color effects. However, very complex gradients with many stops can cause paint performance issues on low-end devices. For animated gradients, prefer animating background-position on an oversized gradient rather than animating the gradient values directly — browsers can't interpolate gradient functions smoothly without triggering a repaint on every frame.

When targeting older browsers, provide a solid color fallback before the gradient declaration: background: #667eea; background: linear-gradient(...);. Browsers that don't understand the gradient function will use the solid color instead. Modern browsers (Chrome 26+, Firefox 16+, Safari 7+) all support the three gradient types generated by this tool without vendor prefixes.