CSS Gradient Generator Online

Design linear, radial, and conic CSS gradients with live color stops and copy the code, right in your browser.

The CSS Gradient Generator runs entirely in your browser. The colors and gradient settings you design are never uploaded to ArrayKit.

Built and maintained by Udit Agarwal

Open the CSS Color Converter

About CSS Gradient Generator

The CSS Gradient Generator designs linear, radial, and conic gradients visually, so you never have to hand-tune a background-image value again. Pick a gradient type, drag the angle slider or the center position, then add, remove, or recolor as many color stops as you need with native color pickers and precise percent positions. A live preview panel updates instantly as you edit, and the tool emits a copy-ready `background: ...;` declaration you can paste straight into a stylesheet. It is built for front-end developers and designers who want to prototype a hero banner, button, or card background without opening a design app. Everything runs locally in your browser, so the gradients you build are never uploaded anywhere.

Features

  • Linear, radial, and conic gradient types in one tool
  • Unlimited color stops, each with a native color picker and a percent position
  • Add or remove stops instantly with add and remove buttons
  • Angle slider and numeric input for linear and conic gradients
  • Circle and ellipse shape toggle with a draggable center position for radial gradients
  • Live preview panel updates as you edit any control
  • Generates a copy-ready `background: ...;` CSS declaration
  • Runs entirely in your browser, with nothing uploaded

How to use the CSS Gradient Generator

  1. Choose Linear, Radial, or Conic as the gradient type
  2. Set the angle (linear/conic) or the shape and center position (radial)
  3. Add color stops and adjust each color and position percent
  4. Copy the generated background CSS from the code panel

Example

Input

linear, 90deg, red -> blue

Output

background: linear-gradient(90deg, #ff0000 0%, #0000ff 100%);

A two-stop linear gradient from red to blue at a 90 degree angle.

Common errors & troubleshooting

  • The gradient looks flat or shows only one color. — Add at least two color stops with different positions — a single stop or two stops at the same position will not produce a visible transition.
  • A radial gradient renders as an oval instead of a circle. — Switch the shape toggle to Circle, or leave it on Ellipse if you want the gradient to stretch to match the element's aspect ratio.
  • The conic gradient starts in the wrong place. — Adjust the angle value — conic gradients rotate their starting stop clockwise from the angle you set, starting at 0deg pointing up.
  • Colors band or look muddy between stops. — Add an intermediate color stop near the transition point instead of relying on the browser to interpolate two very different hues across a wide gap.

Frequently asked questions

What is the CSS Gradient Generator?
It is a visual tool for building linear, radial, and conic CSS gradients from color stops, with a live preview and a copy-ready background declaration — no need to write the gradient syntax by hand.
Can the CSS Gradient Generator create radial and conic gradients, not just linear?
Yes. Switch the segmented control to Radial for a circle or ellipse gradient with a draggable center, or Conic for a gradient that sweeps around a center point from a chosen start angle.
How many color stops can I add in the gradient tool?
As many as you like. Use the Add stop button to append a new stop and the remove button on any row to delete it, as long as at least one stop remains.
Does the CSS Gradient Generator upload my colors anywhere?
No. The CSS Gradient Generator runs entirely in your browser. The colors, positions, and gradients you design never leave your device.
What CSS does the gradient generator output?
A single background declaration, such as background: linear-gradient(90deg, #ff0000 0%, #0000ff 100%);, ready to paste into a stylesheet, a style attribute, or a CSS-in-JS template.
Can I set an exact position for a radial or conic gradient's center?
Yes. The Center X and Center Y sliders let you move the gradient's origin anywhere from 0% to 100% of the element in each direction.

Related tools

Guides

More Web & DevOps tools

  • CSS Box Shadow Generator — Build layered CSS box-shadow values with a live preview and copyable code.
  • CSS Border Radius Generator — Create simple or per-corner CSS border-radius, including blob shapes, with a live preview.
  • .editorconfig Generator — Generate an .editorconfig from indent, charset and newline options with per-language overrides.
  • Aspect Ratio Calculator — Simplify ratios, solve missing dimensions and fit sizes into boxes, with CSS output.
  • Color Palette Generator — Generate harmonious color palettes: lock colors, pick a harmony, copy HEX and export CSS, Tailwind or JSON.
  • Chmod Calculator — Convert Unix file permissions between octal and symbolic (rwx).
  • .gitignore Generator — Build a .gitignore from common language and tool templates.
  • HTTP Status & MIME Types — Searchable reference of HTTP status codes and MIME content types.
  • Open Graph Generator — Generate Open Graph & Twitter meta tags with a live social-card preview.
  • robots.txt Generator — Visually build a robots.txt with user-agent rules, allow/disallow paths, crawl-delay and sitemaps.
  • XML Sitemap Generator — Turn a list of URLs into a standards-compliant sitemap.xml with optional lastmod, changefreq and priority.
  • .htaccess Generator — Toggle and configure common Apache .htaccess snippets with live output.

See all Web & DevOps tools (27) · All tools