CSS Gradient GeneratorBrowser-local processing
en

AppHelp

Build CSS linear gradients visually

Choose colors and direction, preview the gradient, and copy the CSS background rule.

CSS
background: linear-gradient(90deg, #0ea5e9, #f97316);

Common tasks

  • css gradient generator online
  • free css gradient generator
  • css gradient generator no upload
  • browser local css gradient generator
  • css gradient generator for developers
  • design css gradient generator

Quick answer

A CSS linear gradient is written as background: linear-gradient(direction, color, color). This tool builds that line for you: pick a direction, choose two or three colors, check the live preview, and copy the rule into your stylesheet.

How to use

  1. 1. Set the directionType any valid CSS direction such as 90deg, 135deg or to bottom. The default 90deg runs left to right.
  2. 2. Pick the colorsChoose the left and right colors. Tick Use middle color to add a third stop between them.
  3. 3. Copy the CSSCheck the preview, then copy the background declaration and paste it into your CSS, Tailwind arbitrary value or design tokens.

Examples

Two colors, left to right

Input
90deg · #0ea5e9 → #f97316
Output
background: linear-gradient(90deg, #0ea5e9, #f97316);

Three colors, diagonal

Input
135deg · #0ea5e9 → #22c55e → #f97316
Output
background: linear-gradient(135deg, #0ea5e9, #22c55e, #f97316);

Top to bottom

Input
to bottom · #0ea5e9 → #f97316
Output
background: linear-gradient(to bottom, #0ea5e9, #f97316);

Common use cases

  • Hero and banner backgrounds without exporting an image
  • Buttons, cards and badges with a subtle brand gradient
  • Quickly testing color pairs before adding them to a design system
  • Generating a gradient line to paste into CSS, SCSS or a style attribute

Edge cases

  • Only linear gradients are generated. Radial and conic gradients are not supported.
  • Colors come from the browser color picker, so they are opaque hex values; there is no alpha channel or stop position.
  • The direction field is used as typed. An invalid value such as 90 (without deg) makes the browser ignore the whole declaration, and the preview stays empty.
  • Stops are spread evenly. Add your own percentages by hand if you need uneven stops.

Features

  • Live gradient preview
  • Two colors or three with a middle stop
  • Free-text direction: 90deg, 135deg, to right…
  • One-click copy of the finished background rule
  • Runs entirely in your browser

Frequently asked questions

What does the direction value mean?
It is the first argument of linear-gradient(). Angles such as 90deg run left to right and 180deg runs top to bottom; keywords such as to right or to bottom-right also work.
Can I use more than three colors?
Not in the tool itself. Copy the generated rule and add extra stops by hand, for example linear-gradient(90deg, #0ea5e9, #22c55e, #eab308, #f97316).
Is the CSS compatible with all browsers?
Unprefixed linear-gradient() is supported by every current browser, so no -webkit- prefix is needed.
Is my data uploaded?
No. The gradient is built locally in your browser and nothing is sent to a server.