CSS Gradient Generator

Create beautiful CSS gradients with our visual gradient builder. Support for linear, radial, and conic gradients. Add and customize color stops, control direction and position, browse preset gradients, and copy production-ready CSS code instantly -- all client-side in your browser.

deg
Color Stops
Preview
CSS Code

              
            
Preset Gradients

How It Works

🎨

Visual Builder

Create gradients visually with an intuitive interface. Pick colors with color pickers, adjust stop positions with sliders, and see your gradient update in real time as you make changes.

Three Gradient Types

Support for linear, radial, and conic gradients. Linear gradients flow in a straight line at any angle. Radial gradients radiate from a center point. Conic gradients sweep around like a color wheel.

🌈

Color Stop Control

Add up to 8 color stops to create complex multi-color gradients. Each stop has its own color picker and position slider. Remove stops or rearrange them to achieve the perfect look.

📋

Production CSS

Get copy-paste-ready CSS code with vendor prefixes for maximum browser compatibility. Click the Copy button to grab the code and paste it directly into your stylesheets.

Creating CSS Gradients

CSS gradients are smooth transitions between two or more colors, rendered as images by the browser. Unlike static image files, CSS gradients are resolution-independent, scale perfectly on any screen size, and can be customized with code. They are widely used for backgrounds, buttons, borders, and creative UI effects.

Linear Gradients

Linear gradients transition colors along a straight line at a specified angle. A 0-degree gradient flows from bottom to top, 90 degrees flows from left to right, 180 degrees flows from top to bottom, and 270 degrees flows from right to left. You can use any angle from 0 to 360 degrees. Linear gradients are the most common type and are perfect for directional backgrounds, hero sections, and subtle color overlays.

Radial Gradients

Radial gradients radiate outward from a center point in a circular or elliptical pattern. You can control the starting position (center, top, bottom, left, right, or any corner) and the shape (circle or ellipse). Radial gradients are ideal for spotlight effects, vignettes, glows, and backgrounds that draw the eye to a focal point.

Conic Gradients

Conic gradients sweep colors around a center point like the hands of a clock. They start at a specified angle and rotate 360 degrees around the center. Conic gradients are perfect for pie charts, color wheels, loading spinners, and creative geometric patterns. They are less common than linear or radial but offer unique visual possibilities.

Color Stops

Color stops define which colors appear at which positions along the gradient. Each stop has a color and a position (0-100%). A two-stop gradient creates a simple fade between two colors. Adding more stops creates multi-color transitions. You can place stops anywhere along the gradient path to control where colors blend. Stops can even share the same position to create hard color boundaries instead of smooth transitions.

How to Use This Tool

Select the gradient type (linear, radial, or conic) from the dropdown. Add color stops by clicking the Add Color Stop button. For each stop, choose a color using the color picker and adjust the position with the slider or number input. For linear gradients, set the angle using the angle slider. For radial and conic gradients, choose the position from the dropdown. The preview updates in real time as you make changes. When you are satisfied, click Copy CSS to copy the code to your clipboard. You can also click any preset gradient to load a pre-configured gradient and customize it to fit your design.

Common Use Cases

Frequently Asked Questions

How do I create a CSS gradient?
Select the gradient type (linear, radial, or conic), add color stops by clicking the Add Color Stop button, adjust each stop's color using the color picker, and set the position with the slider or number input. For linear gradients, set the angle (0-360 degrees). For radial and conic gradients, choose the position (center, top, bottom, etc.). The preview updates in real time, and the CSS code is generated automatically.
What is the difference between linear, radial, and conic gradients?
Linear gradients transition colors along a straight line at a specified angle. Radial gradients radiate from a center point outward in a circular pattern. Conic gradients sweep colors around a center point like a color wheel. Linear is best for directional backgrounds, radial for spotlights and vignettes, and conic for pie charts or creative effects.
How many color stops can I add?
You can add up to 8 color stops to a gradient. Each stop has a color (selected via color picker) and a position (0-100%). The tool requires at least 2 stops to create a gradient. Click Add Color Stop to insert a new stop, and click the × button next to any stop to remove it (if you have more than 2 stops).
Can I use these gradients in production?
Yes. The generated CSS code includes both standard syntax and -webkit- vendor prefixes for maximum browser compatibility. All modern browsers support CSS gradients. Copy the CSS code and paste it directly into your stylesheets. The gradients work in all major browsers including Chrome, Firefox, Safari, Edge, and mobile browsers.
How do I copy the CSS code?
Click the Copy CSS button below the code output to copy the gradient CSS to your clipboard. The copied code includes both the vendor-prefixed version and the standard syntax, ready to paste into your CSS file. You can also manually select and copy the code from the output panel.
What are the preset gradients?
The tool includes 17 beautiful preset gradients including Sunset, Ocean, Forest, Neon, Peach, Berry, Aurora, Lavender, Coral, Tropical, Fire, Ice, and Rainbow. Click any preset swatch to instantly load that gradient configuration including all color stops, gradient type, and angle. You can then customize the preset to fit your design.
What is the Randomize button for?
The Randomize button generates a random gradient with 2-4 color stops, a random gradient type (linear, radial, or conic), a random angle, and a random position. Use it for creative exploration and inspiration when you need a starting point for your design. You can then customize the randomized gradient by adjusting colors, stops, and settings.

Explore More Developer Tools

Check out our other free developer tools. Convert colors, generate box shadows, format code, and more -- all from your browser with no sign-up required.

Color Converter →