CSS Gradient Generator

Create linear, radial, and conic CSS gradients with live preview and instant code. 100% client-side.

Preview size

🎨 Color stops (2/10)

%
%
Generated CSS
background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
Alternative: background-image
background-image: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);

⚡ Curated presets

🔒 100% private: All generation happens in your browser. Your gradient is never sent to any server.

About CSS Gradient Generator

CSS gradients are one of the most efficient ways to add visual depth to a web design — no images to download, no loading time, and they scale perfectly to any size. CSS supports three gradient types: linear (along a straight line at any angle), radial (from a center point outward), and conic (around a center point like a color wheel). Each type accepts multiple color stops with precise positions. Hand-writing gradient CSS is error-prone: you must remember the syntax for each type, calculate angles, and manage the positions of every stop. This visual generator lets you build gradients by clicking, dragging stops, and adjusting the angle — the CSS updates in real time.

How It Works

  1. Choose a gradient type: Linear, Radial, or Conic.
  2. Add, edit, or remove color stops (color + position).
  3. For linear gradients, adjust the angle or use quick-direction buttons.
  4. For radial gradients, choose the shape (circle/ellipse) and size.
  5. Copy the generated CSS and paste it into your stylesheet.

✨ Key Features

  • ✓Linear, radial, and conic gradients
  • ✓Up to 10 color stops
  • ✓Adjustable angle (linear) with presets
  • ✓Adjustable shape and size (radial)
  • ✓Precise stop positions (0–100%)
  • ✓Live preview with adjustable size
  • ✓Generated CSS in multiple formats (background, background-image, inline)
  • ✓20+ curated presets
  • ✓Random gradient generator
  • ✓Copy CSS with one click
  • ✓100% client-side — no data sent to any server

🎯 Common Use Cases

  • →Creating button gradients for a website
  • →Designing hero section backgrounds
  • →Generating gradient text effects
  • →Building gradient borders and cards
  • →Creating theme colors for a design system
  • →Experimenting with color combinations
  • →Producing gradient backgrounds for presentations
  • →Learning CSS gradient syntax by example

💡 Advanced Tips & Pro Insights

  • ▸Linear gradients: the angle is measured clockwise from "to top" (0° = bottom to top, 90° = left to right, 180° = top to bottom). Use "to right" syntax for keyword directions.
  • ▸Radial gradients: specify shape (circle or ellipse), size (closest-side, farthest-corner, etc.), and position (center by default).
  • ▸Conic gradients: rotate around the center like a pie chart. Add "from Xdeg" to rotate the starting angle.
  • ▸For smooth gradients, place color stops 10–20% apart. Very close stops create hard edges.
  • ▸Modern browsers support `oklch()`, `lch()`, and `color-mix()` for perceptual color interpolation. The generated CSS uses hex for compatibility.
  • ▸For animated gradients, animate the background-position with a larger background-size — a common trick for shimmer effects.

Frequently Asked Questions

Is this CSS gradient generator free?▾
Yes, this CSS gradient generator is completely free with no signup, email, or usage limits.
Is my data safe?▾
Yes, 100% safe. All generation happens in your browser. Your gradient is never uploaded.
What is a CSS gradient?▾
A CSS gradient is a smooth transition between two or more colors, defined entirely in CSS — no images needed. There are three types: linear, radial, and conic.
What is the difference between linear, radial, and conic?▾
Linear gradients transition along a straight line at a specified angle. Radial gradients transition from a center point outward in a circle or ellipse. Conic gradients transition around a center point like a pie chart (color wheel).
Which gradient type should I use?▾
Use linear for buttons, headers, and general backgrounds. Use radial for spotlight effects and subtle vignettes. Use conic for pie charts, color wheels, and modern effects like Microsoft-style corners.
Can I animate a gradient?▾
Yes — a common technique is to use a larger background-size and animate the background-position. This creates a shimmer or moving gradient effect. You can also transition between two gradients on hover.
Are CSS gradients supported everywhere?▾
Yes — all modern browsers (Chrome, Firefox, Safari, Edge) support linear, radial, and conic gradients. Legacy browsers (IE 9 and older) may need fallbacks, but this is rarely a concern today.
What does "background-image: linear-gradient(...)" mean?▾
CSS gradients are technically images, not colors. So they are assigned to "background-image" (or the shorthand "background"), not "background-color". You can also combine a gradient over a background-color.