🌈

Generate CSS Gradients Visually (Linear & Radial — Copy Code)

Create beautiful CSS and Tailwind gradients with a visual editor. Support for linear and radial gradients with full control over colors, angles, and stops.

Design ToolsCreative & Design
Loading tool...

How to Use Gradient Generator

What is a CSS Gradient?

A CSS gradient is a smooth transition between two or more colors, created entirely with CSS without needing image files. Gradients can be linear (along a straight line) or radial (emanating from a center point), and are commonly used for backgrounds, overlays, and design accents.

Types of Gradients

Linear Gradients

Linear gradients transition colors along a straight line at a specified angle:

  • : Bottom to top
  • 90°: Left to right
  • 180°: Top to bottom
  • 270°: Right to left
  • Any angle from 0-360° for custom directions

Radial Gradients

Radial gradients transition colors from a center point outward in a circular or elliptical shape:

  • Circle: Perfect circular gradient
  • Ellipse: Oval-shaped gradient that adapts to element dimensions

How to Use This Tool

Create a Linear Gradient

  1. Select Linear gradient type
  2. Adjust the angle slider (0-360°) to set the direction
  3. Click on color stops in the visual track to edit them
  4. Modify the color using the color picker or HEX input
  5. Adjust the position (0-100%) to move the color stop
  6. Click + Add Stop to add more colors (up to 6 total)
  7. Click × Remove to delete unwanted color stops (minimum 2)
  8. Click Copy CSS or Copy Tailwind to copy the code

Create a Radial Gradient

  1. Select Radial gradient type
  2. Choose a shape (circle or ellipse)
  3. Follow steps 3-8 above for color stops

Tips for Creating Great Gradients

  • Start with 2-3 colors: Simple gradients often look cleaner than complex ones
  • Use analogous colors: Colors next to each other on the color wheel create harmonious gradients
  • Adjust position carefully: Moving stops closer creates sharper transitions, farther creates smoother blends
  • Try different angles: For linear gradients, diagonal angles (45°, 135°, 225°, 315°) often look modern
  • Use the Randomize button: Get inspiration from randomly generated color combinations
  • Consider contrast: Ensure text is readable if using the gradient as a background

Understanding Color Stops

Color stops define where each color appears in the gradient:

  • Position 0%: Start of the gradient
  • Position 50%: Middle of the gradient
  • Position 100%: End of the gradient

You can place stops anywhere between 0-100%. The browser automatically blends colors between stops.

Example Color Stop Patterns

  • Even spacing (0%, 50%, 100%): Smooth, balanced transition
  • Clustered stops (0%, 10%, 20%): Sharp color changes at one end
  • Centered emphasis (0%, 45%, 55%, 100%): Creates a band of color in the middle

Using the Generated CSS

Standard CSS

Copy the CSS snippet and apply it to any element:

.my-element { background-image: linear-gradient(90deg, #ff6b6b 0%, #4ecdc4 100%); }

Tailwind CSS

Use the Tailwind arbitrary value syntax:

<div class="bg-[linear-gradient(90deg,#ff6b6b_0%,#4ecdc4_100%)]"> Content here </div>

Or create a custom utility in your tailwind.config.js:

theme: { extend: { backgroundImage: { 'my-gradient': 'linear-gradient(90deg, #ff6b6b 0%, #4ecdc4 100%)', } } }

Then use: <div class="bg-my-gradient">...</div>

Common Use Cases

  • Hero sections: Eye-catching backgrounds for landing pages
  • Buttons and CTAs: Add depth and visual interest
  • Card overlays: Subtle gradients over images for text readability
  • Navigation bars: Modern gradient backgrounds
  • Dividers: Gradient borders or horizontal rules
  • Loading states: Animated gradient backgrounds
  • Brand elements: Consistent gradient styles across your design

Frequently Asked Questions

Most Viewed Tools

🔐

TOTP Code Generator

2,999 views

Generate time-based one-time passwords from a TOTP secret key. Enter your base32 secret, choose a period and digit length, and get the current and next codes with a live countdown timer. Useful for testing and debugging 2FA integrations.

Use Tool →
{ }

JSON to Zod Schema Generator

2,983 views

Generate Zod validation schema code from a JSON sample object. Infers z.string(), z.number(), z.boolean(), z.array(), z.object(), and z.null() types automatically. Handles nested objects, arrays of objects with optional field detection, and outputs copy-ready TypeScript with import and z.infer type alias.

Use Tool →
{}

JSONL / NDJSON Formatter

2,913 views

Format, validate, and inspect JSON Lines (JSONL) and NDJSON files. Validates each line individually, reports parse errors by line number, outputs compact JSONL or a pretty-print preview, and lets you download the cleaned file.

Use Tool →
🔍

Secret and Credential Scanner

2,523 views

Scan pasted text, code, or config files for accidentally exposed API keys, tokens, passwords, and private keys. Detects 50+ secret types across AWS, GitHub, Stripe, OpenAI, and more — all client-side, nothing leaves your browser.

Use Tool →
🔐

TLS Cipher Suite Checker

2,493 views

Check TLS protocol version compatibility and cipher suite strength ratings against current best practices. Supports IANA and OpenSSL cipher names — rates each suite as Strong, Weak, or Deprecated and explains why.

Use Tool →
🔑

Password Entropy Calculator

2,486 views

Calculate the information-theoretic bit entropy of any password or API key. Detects character set pools automatically, shows the total number of possible combinations, and estimates crack time across five attack scenarios from rate-limited web logins to GPU cracking clusters.

Use Tool →

TOML Config Validator

2,249 views

Validate TOML configuration file syntax and report errors with line numbers. Paste any TOML content — Cargo.toml, pyproject.toml, config.toml — and instantly see a green checkmark with key counts and structure stats, or a precise error message pointing to the exact line. Includes a collapsible JSON structure preview to confirm what was parsed.

Use Tool →
🔒

Content Security Policy Generator

2,113 views

Build Content Security Policy headers interactively. Toggle directives like script-src, style-src, and img-src, select allowed source tokens, and add custom origins. Instantly outputs your CSP as an HTTP header, meta tag, Nginx directive, or Apache header.

Use Tool →

Related Creative & Design Tools

🖼️

PNG to JPG Converter

Convert PNG images to JPG format with adjustable quality and transparency handling. All conversions run locally in your browser - files never leave your device. Perfect for reducing file sizes while maintaining image quality.

Use Tool →
🎨

Neumorphism Generator

Create beautiful neumorphism (soft UI) CSS effects with live preview. Generate soft, extruded 3D elements with dual shadows. Perfect for modern minimalist designs.

Use Tool →
📸

HEIC to JPG Converter

Convert HEIC/HEIF images to JPG format with adjustable quality settings. All conversions run locally in your browser - files never leave your device. Perfect for converting iPhone photos to a universally compatible format.

Use Tool →
💎

Glassmorphism Generator

Create beautiful glassmorphism CSS effects with live preview. Generate frosted glass UI with backdrop blur, transparency, borders, and shadows. Perfect for modern web designs.

Use Tool →
🖼️

JPG to PNG Converter

Convert JPG images to PNG format with lossless quality. All conversions run locally in your browser - files never leave your device. Perfect for preserving image quality and adding transparency support.

Use Tool →
🎨

Color Palette Generator

Generate beautiful, harmonious color palettes for UI design, branding, and themes. Choose from random, analogous, complementary, or monochromatic modes. Lock favorite colors and export as HEX, RGB, or JSON.

Use Tool →
🎨

Color Picker from Image

Extract colors from uploaded image - Get dominant color palette with HEX and RGB values from any photo

Use Tool →
🎨

Color Tints Generator

Generate lighter variations of any color for backgrounds and light themes.

Use Tool →

Share Your Feedback

Help us improve this tool by sharing your experience

We will only use this to follow up on your feedback