CSS Gradient Generator — Linear, Radial & Conic Gradients
Design linear, radial, and conic CSS gradients with a visual color-stop editor. Copy production-ready CSS or Tailwind classes. Free, no signup, runs entirely in your browser.
Last updated:
CommentsAdd color stops and choose linear or radial above to design a CSS gradient with a live preview. Copy production-ready CSS or Tailwind classes. Everything runs in your browser.
background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%)
bg-gradient-to-br from-[#3b82f6] to-[#8b5cf6]
What is CSS Gradient?
A CSS gradient generator lets you visually design linear and radial gradients and copy the exact CSS. Gradients are pure CSS — no image files — so they're crisp at any resolution, tiny in size, and easy to animate. This tool gives you a live preview while you add color stops, set the angle or shape, and then exports either raw CSS or Tailwind utility classes.
How to create a CSS gradient
- 1Choose linear or radial gradient type.
- 2Add color stops and drag them to position; set the angle for linear gradients.
- 3Watch the live preview update as you tweak stops and direction.
- 4Copy the generated CSS (or Tailwind classes) into your stylesheet.
Use Cases
Design hero backgrounds
Create an eye-catching linear gradient background for a landing page hero without any image asset.
Style buttons and cards
Add depth to buttons and cards with subtle gradients that scale crisply on any display.
Export Tailwind classes
Grab bg-gradient-to-r from-*/via-*/to-* utilities to drop straight into a Tailwind project.
Code Examples
Linear gradient
background: linear-gradient(90deg, #3B82F6 0%, #8B5CF6 100%);Radial gradient
background: radial-gradient(circle at center, #F59E0B 0%, #EF4444 100%);Key Concepts
- Color stops
- Each stop is a color plus an optional position (%). Two stops make a simple fade; more stops create bands and multi-color transitions.
- Linear vs radial
- Linear transitions along a line defined by an angle (90deg = left-to-right). Radial emanates outward from a center point as circles or ellipses.
- Angle direction
- In CSS, 0deg points up and angles increase clockwise, so 90deg goes to the right. Keyword forms like 'to right' are equivalent.
Tips & Best Practices
- ▸Modern browsers need no vendor prefixes for standard gradients — the -webkit- prefixes are legacy.
- ▸Add a matching solid background-color fallback for very old browsers.
- ▸Subtle gradients (close hues, low contrast) look more professional than harsh rainbow transitions.
- ▸For arbitrary angles or 3+ stops, use the raw CSS output — Tailwind utilities cover only common cases.
Frequently Asked Questions
What's the difference between linear and radial gradients?
Linear gradients transition along a straight line, defined by an angle or 'to right/top-left' keywords. Radial gradients emanate from a center point outward in circles or ellipses, defined by shape and size.
Can I use these gradients as CSS backgrounds?
Yes. The output is a complete CSS value ready to paste into a background or background-image property. It works in all modern browsers without prefixes.
Does the Tailwind output work with any Tailwind version?
The output uses Tailwind 3 gradient utility classes (bg-gradient-to-r, from-, via-, to-). For arbitrary angles or three-plus stops, use the raw CSS output which works everywhere.
Try Next
Meta Tag Preview
Preview how your page will appear in Google search results and social share cards on Facebook, Twitter/X, and LinkedIn. Parses <title>, meta description, canonical, and full Open Graph / Twitter Card tags with diagnostics. 100% local.
Related Tools
HTTP Status Codes
Complete reference of HTTP status codes with meanings, use cases, and RFC citations. Search 60+ codes from 100 Continue to 511 Network Authentication Required.
cURL Converter
Convert cURL commands to Python (requests), JavaScript (fetch), Node.js, Go (net/http), PHP, or Java (HttpClient). Parses -H, -d, --data-urlencode, -F, -u, --json and more. 100% local.
URL Parser
Parse any URL into scheme, host, port, path, and query parameters — or build a URL from scratch with a form. Great for debugging redirect chains, tracking pixels, and OAuth flows. 100% local.
CIDR Calculator
Calculate IPv4 subnets from CIDR notation online. Get network address, broadcast, netmask, wildcard, usable host range, IP class, and binary representation. 100% local — nothing leaves your browser.
Color Converter
Convert colors between HEX, RGB, HSL, and HSV instantly with a live color preview and copy-ready CSS strings. Free, no signup, runs entirely in your browser.
User Agent Parser
Parse User-Agent strings to identify browser, engine, operating system, and device. Instantly see what your own browser sends.