CSS Gradient Generator

Create beautiful CSS gradients visually. Pick colors, adjust stops, and copy the generated CSS code. Everything runs in your browser.

Live Preview
deg

Preset Gradients

How to Use CSS Gradients

CSS gradients let you create smooth transitions between two or more colors. They are rendered as images by the browser, so they are resolution-independent and look sharp on any display. Gradients are set using the background or background-image CSS properties.

Linear Gradients

A linear gradient transitions colors along a straight line defined by an angle. The default direction is top to bottom (180deg). You can specify any angle from 0 to 360 degrees, or use keywords like to right, to bottom left, etc.

Radial Gradients

A radial gradient radiates colors outward from a center point. You can control the shape (circle or ellipse) and the position of the center. Radial gradients are perfect for spotlight effects, glowing elements, and soft backgrounds.

Color Stops

Color stops define the colors in your gradient and where each color appears along the gradient line. Each stop has a color value and an optional position (in percentage). Adding more stops lets you create more complex, multi-color gradients.

Features

Browser Support

CSS gradients are supported in all modern browsers. The generated code uses the standard syntax without vendor prefixes, which works in Chrome, Firefox, Safari, Edge, and Opera. For very old browsers, consider adding a solid fallback color before the gradient declaration.

Frequently Asked Questions

What is a CSS gradient?
A CSS gradient is a smooth transition between two or more colors, created purely with CSS — no images needed. CSS supports linear gradients (along a straight line), radial gradients (from a center point), and conic gradients (around a center point).
What's the difference between linear and radial gradients?
Linear gradients transition colors along a straight line at a specified angle (e.g., left to right, top to bottom, or diagonal). Radial gradients transition colors outward from a center point in a circular or elliptical shape.
Can I use gradients as backgrounds in all browsers?
Yes, CSS gradients are supported in all modern browsers including Chrome, Firefox, Safari, and Edge. The standard syntax (linear-gradient, radial-gradient) works without vendor prefixes in all current browser versions.
Keyboard Shortcuts
Ctrl+Enter Run / Format
Ctrl+Shift+C Copy output
Ctrl+L Clear