CSS Gradient Generator
Create beautiful CSS gradients visually and copy the generated CSS instantly.
Drag a handle on the bar above, or edit a stop below. Between 2 and 10 stops.
background: linear-gradient(90deg, rgba(91, 61, 245, 1) 0%, rgba(236, 72, 153, 1) 100%);Whether you're styling a hero section, a button hover state, or a card background, this tool builds linear and radial CSS gradients visually - drag color stops, fine-tune alpha transparency, and copy the exact CSS the moment it looks right. Everything renders entirely in your browser using native CSS gradients; nothing is ever uploaded.
Linear vs. radial gradients
A linear gradient transitions colors along a straight line at a chosen angle (0° points up, 90° points right) - the most common choice for backgrounds, buttons, and overlays. A radial gradient instead radiates outward from a center point, shaped as either a circle (equal in all directions) or an ellipse (stretched to match the element's own width/height) - useful for spotlight effects, glows, and vignettes.
CSS gradient examples
background: linear-gradient(90deg, #5b3df5 0%, #ec4899 100%);- a simple two-color horizontal gradient.background: linear-gradient(135deg, #ff512f 0%, #f09819 100%);- a warm diagonal "sunset" gradient.background: radial-gradient(circle at center, #12c2e9 0%, #c471ed 100%);- a centered radial glow.
Browser compatibility
Both linear-gradient() and radial-gradient() have been supported, unprefixed, in every major browser (Chrome, Firefox, Safari, Edge) for many years - there's no vendor-prefix or fallback needed for the CSS this tool generates. Multi-stop transparency (RGBA color stops) is equally universal.
Frequently asked questions
How do I make a gradient with more than two colors?
Click "Add Stop" - the new stop is inserted in the middle of the widest existing gap, already blended between its two neighbors, up to a maximum of 10 stops.
What does the angle actually control?
For a linear gradient, the angle sets the direction the color transition flows - 0deg points straight up, 90deg points right, 180deg points down, matching the CSS specification exactly (not the "0° = right, counterclockwise" convention used in math or some design tools).
Can I use these gradients as a text or border color?
Not directly - CSS gradients are background images, not colors. To apply one to text, set it as a background, then add background-clip: text; color: transparent;. For a gradient border, apply it to a wrapping element's background and use padding to reveal a border-width sliver.
Why does my downloaded/copied CSS look different from the preview?
It shouldn't - the preview's inline style and the copied/downloaded text are generated by the exact same function, so they're always in sync. If a color looks off after pasting, check that your project's CSS isn't overriding the same property elsewhere.
Is my gradient design uploaded anywhere?
No - every stop, color, and preview is calculated and rendered locally in your browser; nothing is ever sent anywhere.
Related tools
Try the Color Converter, or browse the rest of the Developer tools on NeatSize.
Runs entirely in your browser - nothing you enter or upload is sent to a server.
Need it to do something else? Request a tool