CSS Gradient Generator
Your input stays in your browser and is never sent.Build linear, radial and conic gradients by moving the angle and color stops, then copy the CSS. The CSS shown is exactly what the preview uses.
- Enter
- See the result
This is exactly the CSS the preview uses. Paste it as is.
What is the CSS gradient generator?
The CSS gradient generator builds the CSS for a background gradient from a type, an angle and your colors. It supports linear, radial and conic gradients.
Add or move a color stop and the preview and the CSS on the right change at once, so you can judge the look while you work instead of rewriting the CSS by hand.
The finished CSS is a single line — copy it and paste it into your stylesheet. No sign-up or login, and it's free.
How to use the CSS gradient generator
- Choose a typePick linear, radial or conic. You can also start from a preset.
- Set colors and positionsChoose each color and give it a position from 0 to 100%. You can add or remove colors.
- Copy the CSSCopy the CSS on the right and paste it into the background of your stylesheet.
Features of SOKUFU's CSS gradient generator
- Three gradient types
- Linear, radial and conic. A conic gradient turns around its center like a pie chart.
- Up to 8 colors
- Use 2 to 8 color stops. Positions can be set precisely by number.
- Start from a preset
- Sunset, ocean, mint, night sky and rainbow presets are included. Tweak the one you like.
- One line to paste
- The output looks like "background: linear-gradient(...);", ready for your stylesheet.
- Runs in your browser
- Nothing you enter is ever sent to a server.
- Works on phones
- The layout adapts to your screen, so it works on phones and tablets too.
How gradient CSS is written
A linear gradient is written linear-gradient(angle, color position, color position, ...). 0deg points up and the angle grows clockwise, so 90deg runs left to right and 180deg runs top to bottom.
A radial gradient is radial-gradient(circle, color position, ...) and changes color from the center outward. A conic gradient is conic-gradient(from angle, color position, ...) and turns clockwise starting from the top.
Using the same color at the first and last stops hides the seam in a conic gradient.
Related tools to use with the CSS gradient generator
- Gradient Image GeneratorUse it when you want the gradient as an image file instead of CSS.
- Color Code Converter (HEX, RGB, HSL)Use it to turn a color you have into HEX, RGB or HSL before entering it.
- CSS Filter GeneratorUse it when you want to adjust how an image looks in CSS, not just a background.
CSS gradient generator FAQ
Which direction is 0 degrees?
0 degrees points up and the angle grows clockwise. 90 degrees points right and 180 degrees points down.
How many colors can I add?
Up to 8. You can't go below 2 colors.
Can I use the CSS as it is?
Yes. It is the same CSS the preview uses, so pasting it into background gives the same look.
How can I enter colors?
As HEX (#6366F1), rgb(), hsl() or a basic color name such as red or blue. The output is normalized to #RRGGBB.
Are my gradient colors and settings sent to a server?
No. The preview and the CSS text are both built in your browser. The colors and angle you pick are not sent anywhere.
Related tools
- Dummy Image GeneratorMake a placeholder image on the spot by choosing its width, height, colors and text. Save it as PNG, JPG, WebP or SVG, or copy it as a data URI.
- CSS Cursor ListBrowse all 36 values you can give the CSS cursor property and try each as a real cursor. Press a card to copy cursor: value;.
- Gradient Image GeneratorTurn a linear, radial or conic gradient into an image of any size and download it as PNG, JPG or WebP. Handy for backgrounds and wallpapers.
- Tailwind Color GeneratorBuild the 11-step Tailwind CSS palette (50 to 950) from one base color, and copy it as @theme (v4), tailwind.config (v3) or a plain HEX list.
- CSS Filter GeneratorMove sliders for nine CSS filter functions — blur, brightness, contrast, grayscale and more — and copy the CSS while watching Before and After. You can try it on your own image.
- Markdown Table GeneratorBuild a Markdown table by choosing rows and columns. Paste from Excel or Google Sheets, and export as HTML or CSV too.
- Schema Markup GeneratorCreate JSON-LD schema markup by filling in a simple form. Local business, organization, article, FAQ and breadcrumb.
- Color Code Converter (HEX, RGB, HSL)Convert a color code between HEX, RGB and HSL in any direction. Every form is listed side by side, including the one PowerPoint accepts.
- RGB to HEX ConverterTurn an RGB value (59, 130, 246) into a HEX color code (#3B82F6). The forms without # and with alpha are listed too, ready to copy.
- HEX to RGB ConverterTurn a HEX color code (#3B82F6) into RGB (59, 130, 246). The R, G and B numbers PowerPoint asks for can each be copied on their own.
- Color Contrast CheckerCalculate the contrast ratio between a text color and a background color and check it against WCAG 2.x AA and AAA for normal text, large text and UI components.
- Image Color PickerLoad an image and press anywhere on it to get that spot's color as HEX, RGB and HSL. The five main colors of the whole image are listed too. The image never leaves your device.
- Excel to MarkdownTurn Excel (.xlsx, .xls, .csv) into Markdown tables. Each sheet gets its own heading and table, ready to copy or save as .md. Free, no sign-up, and your file is never uploaded.
- HTML to Markdown ConverterConvert HTML files (.html / .htm) or pasted HTML to Markdown, keeping headings, tables, lists, links and code. Conversion runs entirely in your browser.
- Markdown to HTML ConverterConvert Markdown to HTML. The preview and HTML update as you type, with support for tables, task lists and strikethrough.
- URL to Markdown ConverterEnter a web page URL and get it back as Markdown, with headings, tables, lists and links kept. Handy for feeding pages to an AI assistant or tidying research notes.
- Digital Stamp CreatorMake round, square, or date hanko stamps and save them as transparent PNG images.
- Japanese Resume (Rirekisho) BuilderMake a JIS-standard Japanese resume (rirekisho) PDF, with era dates and an ID photo.
- QR Code GeneratorMake a QR code from a URL, text, Wi-Fi login and more. Change the colors, dot shape and add a logo.
- Random Number GeneratorGenerate random numbers in any range. Choose how many, whether to avoid duplicates, the number of decimal places and the sort order. Handy for raffles and drawing numbers.
- Online Ruler (Actual Size)Show a ruler on your screen at real-world size. Match the screen to a card you have on hand, then measure in cm and mm or in inches. Free, no sign-up.
- Japanese Name GeneratorGenerate random Japanese names by combining common surnames and given names. Choose male or female names; each is shown in Latin letters with its kanji. Handy for naming characters in stories and games.
- Username GeneratorGenerate random usernames for games and social media. Choose English word pairs or random letters, and set the separator, capitalization, trailing digits and length.
- Bingo Card GeneratorMake 5×5 bingo cards, up to 24 at once, and print them as they are. Numbers come from the standard range for each column without repeats, and you can choose whether the center is a free space.
- Drawing Prompt RouletteSpin a wheel to choose what to draw next. Over 30 prompts that pair a subject with a scene are included, and you can rewrite them for practice or events.