Skip to main content
Developer Tools

CSS Gradient Generator

Create beautiful linear and radial CSS gradients with live preview. Copy-ready CSS output.

Presets

Type

0%
100%
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

How to Use

  1. 1. Choose a preset or start from scratch.
  2. 2. Select gradient type: Linear (directional) or Radial (center-out).
  3. 3. Pick your two colors using the color pickers or hex inputs.
  4. 4. Adjust the angle (linear) or shape (radial), and set color stop percentages.
  5. 5. Click Copy CSS and paste the output into your stylesheet.

About CSS Gradient Generator

CSS gradients are one of the most powerful and underutilized CSS features. They let you create smooth color transitions purely in CSS — no images, no HTTP requests, no Photoshop. They are infinitely scalable, render crisp at any resolution, and can be animated with CSS transitions.

Linear gradients flow in a specific direction defined by an angle: 0° is bottom-to-top, 90° is left-to-right, 135° is diagonal, and 180° is top-to-bottom. Radial gradients emanate from a center point and can be circular or elliptical.

Color stops control where each color begins and ends along the gradient. A stop at 0% is the start; 100% is the end. By shifting the stops (e.g., color1 at 30% and color2 at 70%), you can create sharp bands or control the transition speed.

Our generator gives you a live preview as you adjust every parameter — type, angle, colors, and stops — and outputs a production-ready CSS background property you can paste directly into your stylesheet or CSS-in-JS code.

You may also find our Color Palette Generator, Box Shadow Generator, and Color Shades Generator helpful.

Frequently Asked Questions

What is a CSS gradient?

A CSS gradient is a smooth transition between two or more colors, rendered directly by the browser without any image files. Linear gradients go from one direction to another; radial gradients radiate from a center point.

How do I use the generated CSS?

Copy the output CSS and paste it into your stylesheet. You can apply it to any element as a background property. It works on divs, buttons, headers, hero sections, and more.

What is the angle value for linear gradients?

The angle controls the direction of the gradient in degrees. 0° goes bottom to top, 90° goes left to right, 135° goes top-left to bottom-right, and 180° goes top to bottom.

Can I use more than two colors?

This tool supports two-color gradients. To add more color stops manually, you can extend the generated CSS like: linear-gradient(135deg, #color1 0%, #color2 50%, #color3 100%).

Was this tool helpful?

Share: