CSS Gradient Generator

Create linear and radial gradients visually. Copy the CSS with one click.

Gradient Presets

Click any preset to load it into the editor.

How It Works

Four steps to create and export any CSS gradient.

1

Choose a gradient type

Toggle between Linear and Radial. Linear gradients flow along a straight line at any angle — great for backgrounds and hero sections. Radial gradients radiate outward from a center point — ideal for glows, spotlights, and circular accents.

2

Set the angle (linear only)

Drag the angle slider from 0° to 360° to rotate the direction of the gradient. 0° flows top to bottom, 90° flows left to right, 135° flows diagonally — a popular choice for modern UI designs.

3

Adjust color stops

Each color stop has a color picker and a position slider (0–100%). Click the color swatch to change the color, drag the slider to reposition it along the gradient. Hit + Add Stop to insert additional stops for multi-color gradients, or remove any stop with the ✕ button. The live preview updates instantly.

4

Copy the CSS and use it anywhere

The CSS output box shows the ready-to-use background property. Click Copy CSS to copy it to your clipboard and paste it directly into your stylesheet, Figma, Tailwind config, or any design tool that accepts CSS.

What is a CSS Gradient?

Linear Gradient

Transitions colors along a straight line at any angle. Used for backgrounds, buttons, and banners. Defined with linear-gradient() in CSS.

Radial Gradient

Transitions colors outward from a center point in a circular or elliptical shape. Defined with radial-gradient() in CSS.

Color Stops

Each stop defines a color and its position along the gradient. You can add as many stops as you need to create complex multi-color gradients.

Common Questions About CSS Gradients

Answers to what people search for most.

How do I create a CSS gradient?
Use the linear-gradient() or radial-gradient() CSS function as a background value. Example: background: linear-gradient(135deg, #667eea, #764ba2);. This tool generates the exact CSS for you — just pick your colors and copy.
What is a linear gradient in CSS?
A linear gradient transitions between two or more colors along a straight line. You control the angle (e.g. 90deg = left to right, 180deg = top to bottom) and the color stops. It's the most common gradient type used in web design for backgrounds, buttons, and headers.
What is a radial gradient in CSS?
A radial gradient radiates colors outward from a center point in a circular or elliptical shape. Defined with radial-gradient(circle, #color1, #color2). Commonly used for glows, spotlight effects, and decorative backgrounds.
How do I add multiple colors to a CSS gradient?
Add more color stops separated by commas. Example: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #fda085 100%). Use the + Add Stop button in this tool to insert additional stops and position them visually.
How do I use a CSS gradient as a background?
Copy the CSS output from this tool and paste it as your background or background-image property in your stylesheet. Example: background: linear-gradient(135deg, #667eea, #764ba2);. It works on any HTML element.
Can I use gradients in Tailwind CSS?
Yes. Tailwind has built-in gradient utilities like bg-gradient-to-r from-purple-500 to-pink-500. For custom gradients generated here, use an arbitrary value: bg-[linear-gradient(135deg,#667eea,#764ba2)] or add it to your tailwind.config.js under backgroundImage.
How do I make a gradient text effect in CSS?
Apply the gradient as a background, then add -webkit-background-clip: text and -webkit-text-fill-color: transparent. Example: background: linear-gradient(90deg, #f093fb, #f5576c); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
Are CSS gradients supported in all browsers?
Yes. linear-gradient() and radial-gradient() are supported in all modern browsers including Chrome, Firefox, Safari, and Edge. No vendor prefixes are needed for standard usage in 2024.
What is the difference between linear and radial gradients?
Linear gradients flow in a straight line at a given angle — best for directional backgrounds and overlays. Radial gradients radiate outward from a center point — best for glows, depth effects, and circular designs. Both accept multiple color stops.
How do I control the position of a color stop?
Add a percentage after the color value in the CSS. Example: linear-gradient(135deg, #667eea 0%, #764ba2 60%, #f5576c 100%). The percentage defines where along the gradient that color is fully reached. Use the position sliders in this tool to set them visually.
Copied!