π Runs in your browser β nothing is uploadedβ Free, no signup
CSS Gradient Generator
Build linear and radial gradients visually β pick colors, drag stops and set the angle β then copy ready-to-use CSS.
CSS
background: #6D28D9; background: linear-gradient(135deg, #6D28D9 0%, #EC4899 100%);
The first line is a solid fallback for very old browsers.
Type
Color stops
- 0%
- 100%
Presets
When should you use the CSS Gradient Generator?
- Designing a hero or button background without an image
- Matching a gradient from a design file in CSS
- Trying color combinations quickly with live preview
How to use the CSS Gradient Generator
- 1
Pick a type
Choose linear for a straight blend or radial for a circular one.
- 2
Set the direction
Drag the angle slider for linear gradients, or choose circle or ellipse for radial.
- 3
Edit color stops
Change colors, drag positions, and add or remove stops. Or start from a preset.
- 4
Copy the CSS
Click Copy CSS and paste it into your stylesheet.
Examples
Two-color diagonal gradient
Settings
Type: linear, angle 135Β° Stops: #6D28D9 0%, #EC4899 100%
CSS
background: #6D28D9; background: linear-gradient(135deg, #6D28D9 0%, #EC4899 100%);
Common errors and how to fix them
The gradient doesn't show on my element- The element needs a size. Give it a height (or content) β an empty element with no height has nothing to paint.
There's a hard line instead of a smooth blend- Two stops are at the same position. Move them apart for a smoother transition.
Explore More Developer Tools
Format, Validate, and Generate Data Instantly
TrueFormatter provides essential utilities for modern web development, including JSON formatting, YAML conversion, and more.
JSON Auto-Fixer & Formatter
Repair, validate, and beautify broken JSON (missing quotes, trailing commas).
JSON Validator & Linter
Check JSON syntax and see the exact line and column of every error.
JSON Beautifier
Pretty-print and indent JSON for easy reading and debugging.
JSON Compare & Diff Tool
Find the difference between two JSON objects visually and quickly.
JSONPath Tester
Evaluate JSONPath expressions with filters and recursive queries.
JSON Schema Generator
Generate a JSON Schema from any sample JSON document.
JSON to CSV Converter
Flatten nested JSON arrays into CSV for spreadsheets.
YAML β JSON Converter
Convert YAML to JSON or JSON to YAML instantly.
CSV to JSON Converter
Convert CSV or TSV data to a JSON array of objects, with type detection.
JSON to TypeScript
Generate TypeScript interfaces from any JSON sample.
JWT Decoder
Decode and inspect JSON Web Tokens (JWT) Header and Payload.
JWT Generator
Create and sign HS256/HS384/HS512 JSON Web Tokens for testing.
Hash Generator (MD5, SHA)
Generate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes.
Password Generator
Generate strong, random passwords with the length and characters you choose.
Base64 Encoder β Decoder
Encode text to Base64 and decode Base64 to text for API debugging.
URL Encoder & Decoder
Cleanly encode special characters in URLs and decode query strings.
SQL Formatter & Beautifier
Format SQL queries for MySQL, PostgreSQL, SQL Server, SQLite and more.
CSS Minifier & Compressor
Optimize CSS by removing whitespace and comments to accelerate page load time.
JS Minifier & Compressor
Compress JavaScript to improve website speed and performance.
HTML Formatter & Beautifier
Beautify or minify HTML with clean, consistent indentation.
Markdown Editor & Preview
Write Markdown with a live preview and copy the HTML.
Word & Character Counter
Count words, characters, sentences and reading time as you type.
Case Converter
Convert text to camelCase, snake_case, kebab-case, Title Case and more.
Text Diff & Compare
Compare two texts and highlight every added and removed word or line.
Lorem Ipsum Generator
Generate placeholder paragraphs, sentences or words as text or HTML.
Fancy Text & Font Generator
Turn text into ππ¨π₯π, πͺπ΅π’ππͺπ€, ππΈππΎπ π and other Unicode font styles you can paste anywhere.
Color Picker & Converter
Pick a color and convert between HEX, RGB and HSL instantly.
Color Palette Generator
Generate harmonious color palettes and export them as CSS, Tailwind or JSON.
CSS Gradient Generator
Build linear and radial CSS gradients visually and copy the code.
PX to REM Converter
Convert pixels to rem and rem to pixels for any root font size.
Regex Tester & Debugger
Test JavaScript regular expressions with live match highlighting and groups.
Cron Expression Generator
Build cron schedules, read them in plain English and preview next runs.
UUID / GUID Generator
Generate unique V4 UUIDs for database keys or testing.
Epoch converter online
Convert UNIX timestamps to human-readable dates and back instantly.
Time Zone Converter
Convert a time between time zones and compare cities side by side.
Random Number Generator
Generate random numbers in any range β unique, sorted or decimals.
Crop Image Online
Crop images exactly as selected with fixed aspect ratios. No upload, no resize, no quality loss.
Compress Image Online
Compress JPG, PNG & WebP images directly in your browser. No upload, no tracking, instant download.
Image Resizer
Resize images to exact pixels or a percentage, keeping the aspect ratio.
Image Converter (PNG, JPG, WebP)
Convert images between PNG, JPG and WebP in your browser.
Image to Base64
Convert an image to a Base64 data URI for CSS, HTML or JSON.
CSS Gradient Generator FAQ
Choose linear or radial, set the angle or shape, pick your color stops and copy the generated CSS. Paste it into the background property of any element.
A linear gradient blends colors along a straight line at the angle you choose. A radial gradient spreads out from the center as a circle or ellipse.
Each stop sets where a color is fully applied along the gradient, from 0% (start) to 100% (end). Moving two stops close together makes a sharper transition.
It's a fallback. Browsers that can't render the gradient use the solid color instead. All modern browsers support CSS gradients, so it's rarely needed but harmless.
Yes. Use an arbitrary value such as bg-[linear-gradient(135deg,#6D28D9_0%,#EC4899_100%)] β replace spaces with underscores β or put the CSS in a custom class.
No. Gradients are drawn by the browser, so they're usually lighter than an image and stay sharp at any size.
