Favorite places of your favorite city
Home
Add to preferred sources on Google

CSS Gradient Generator

Create a linear or radial background, adjust its colors and copy the matching CSS. The preview uses the generated expression; its backing and size are not included in your code.

Gradient settings

Enter 0–360, with at most one decimal place. Use a dot or comma.

Color stop 1

Use #RGB or #RRGGBB; opacity is separate.

Enter 0–100, with at most one decimal place. Use a dot or comma.

Enter 0–100, with at most one decimal place. Use a dot or comma.

Color stop 2

Use #RGB or #RRGGBB; opacity is separate.

Enter 0–100, with at most one decimal place. Use a dot or comma.

Enter 0–100, with at most one decimal place. Use a dot or comma.

Preview and CSS

A linear angle of 0° points up and 90° points right. Radial percentages follow the selected shape and extent. Edge centers and closest extents can produce a flat or line-like result. The backing and box size change the preview, not the CSS.

How the CSS is built

Linear gradient · explicit sRGB interpolation

The gradient uses the selected geometry and explicit encoded-sRGB interpolation. Opacity stays separate from each RGB color.

Angle (degrees): 90° · sRGB

StopHex colorOpacity (%)Position (%)
1#FF0000 · RGB 255 0 0100%0%
2#0000FF · RGB 0 0 255100%100%

Stops at the same position stay separate and in their selected order, allowing a sharp transition.

Your gradient is built in this page. Your values are not uploaded or saved by this tool.

Build a gradient

  1. Choose Linear and an angle, or Radial with a shape, extent and center.
  2. Edit each color, opacity and position. Keep positions in order; equal positions create a sharp transition. Add or duplicate a stop when you need another color.
  3. Inspect the preview and the CSS, then copy the declaration or download gradient.css. Change the preview backing to see transparency more clearly.

Understand the controls

A linear angle of 0 degrees points up and 90 degrees points right. The same angle can look different in a wide box and a square box.

A radial gradient expands around its center. Circle or ellipse and the selected extent determine where the 100 percent stop lies.

Opacity is separate from the RGB color. The code keeps the percentage you enter and explicitly selects sRGB interpolation; a transparent stop does not paint the preview backing into the CSS.

Enter percentages with a dot or comma and at most one decimal place. Positions must equal or follow the previous row. This editor uses 2–8 stops, not every feature accepted by CSS.

Useful starting points

For a left-to-right background, choose Linear at 90 degrees and keep the red stop at 0 percent and blue stop at 100 percent.

For a sharp dividing line, use two differently colored stops at the same position. Their row order determines the change at that point.

For a faded radial background, choose a circle, give the outer color 0 percent opacity and inspect it over both light and dark backings. The backing itself is not exported.

Know the preview limits

This generator creates one linear or radial gradient in sRGB. It does not import arbitrary CSS or produce conic, repeating, mesh, image or animated backgrounds.

A browser that cannot parse the explicit interpolation syntax may still let you copy the code, but cannot show this preview. No alternate gradient is silently substituted.

Box dimensions, backing, browser rendering and display color handling affect appearance. This is not a guarantee of identical pixels, a contrast test or print-color calibration.

Some radial centers and closest extents produce a degenerate result rather than a smooth fade. Invalid active inputs clear the current result instead of leaving older CSS available.

Your gradient stays in the page

Gradient editing and code generation run in the page without uploading your values. This tool does not save your drafts. Copy and download happen only when you choose them; the site's general privacy policy still applies.

CSS gradient questions

Use 2–8 color stops. Each has its own RGB color, opacity and percentage position. Intentional duplicates are preserved.

Yes. Put differently colored stops at the same position. Keep their intended order; the editor does not sort or merge them.

No. Checkerboard, light and dark are preview backings only. The export contains one background-image declaration.

Check the element's size, background and browser support. Those can affect appearance even when you use exactly the same gradient expression.

No. The RGB color and opacity are separate. The generated CSS uses your exact opacity percentage rather than converting it to a rounded alpha byte.

gradient.css contains the same complete declaration shown and copied by the tool, encoded as UTF-8 without an added byte-order mark or final newline.

Sources and method

These CSS specifications provide context for gradient geometry, color interpolation and serialization.

The editor's one-decimal subset is a product choice. These documents do not certify browser support or rendering accuracy.

SVG to PNG

Convert a local SVG file or pasted markup into PNG, with explicit dimensions, transparency and bundled fonts.

Open tool — SVG to PNG

CSS Filter Generator

Order and repeat CSS effects, compare a specimen and copy the exact filter declaration.

Open tool — CSS Filter Generator

Fluid Font Size Calculator

Create root-relative CSS from viewport endpoints and inspect the copied size model.

Open tool — Fluid Font Size Calculator

CSS Button Generator

Style native button states, inspect keyboard focus and copy HTML and CSS.

Open tool — CSS Button Generator

CSS Border Radius Generator

Edit eight corner radii, preview a box and copy CSS in pixels or percentages.

Open tool — CSS Border Radius Generator

CSS Grid Generator

Build a bounded CSS Grid example with editable tracks, placement and named areas. Preview it, copy CSS or HTML and download the same standalone example.

Open tool — CSS Grid Generator

CSS Flexbox Generator

Build a Flexbox example with container and item controls, explicit layout axes, matching CSS and HTML, and a local complete-example download.

Open tool — CSS Flexbox Generator

CSS Text Shadow Generator

Build ordered text shadows, preview plain text and copy exact CSS.

Open tool — CSS Text Shadow Generator

CSS Transform Generator

Compose repeatable 2D CSS transforms, edit px or percentage translation and origin, inspect a reference box and copy the exact current declarations.

Open tool — CSS Transform Generator

CSS Box Shadow Generator

Create ordered CSS box-shadow layers with a live preview and copyable code.

Open tool — CSS Box Shadow Generator

Image Watermark

Add a text or logo watermark to a batch of images, review each result and download individual files or a ZIP.

Open tool — Image Watermark

Color Converter

Convert supported sRGB HEX, RGB and HSL literals with alpha, explicit precision and current code Copy.

Open tool — Color Converter

Image to Text (OCR)

Recognize printed text in local PNG or JPEG images, choose a language and review or correct the result before copying or downloading.

Open tool — Image to Text (OCR)

QR Code Reader

Read one QR code from a local PNG or JPEG and inspect its text or content bytes without opening links.

Open tool — QR Code Reader

Color Contrast Checker

Compare foreground and background colors, adjust opacity and check WCAG numerical contrast thresholds for text and essential interface details.

Open tool — Color Contrast Checker

Print Size & Resolution Calculator

Calculate print dimensions, required pixels and effective PPI with fit or crop.

Open tool — Print Size & Resolution Calculator

Aspect Ratio Calculator

Find a width-to-height ratio or calculate a matching pixel size from one target dimension.

Open tool — Aspect Ratio Calculator

Image Compressor

Try to fit a JPEG, PNG or WebP within a target file size, with measured results and optional smaller dimensions.

Open tool — Image Compressor

HEIC to JPG

Convert supported HEIC photos locally into full-size JPG copies, with quality and background controls and verified individual or ZIP downloads.

Open tool — HEIC to JPG

Image Converter

Convert supported PNG, JPEG and WebP images locally with batch targets, transparency, background and quality controls, then review and download the encoded files.

Open tool — Image Converter

Photo Collage Maker

Arrange local photos in a grid, adjust crops and spacing, and download PNG or JPEG.

Open tool — Photo Collage Maker

Rotate & Flip Images

Rotate or mirror a local batch of static PNG, JPEG and WebP images, then review and download the processed results.

Open tool — Rotate & Flip Images

Image Cropper

Crop one local JPEG, PNG or WebP to exact pixels with visual and numeric controls. Download PNG or JPEG.

Open tool — Image Cropper

Image Resizer

Resize a JPG, PNG or WebP image by pixels or percentage, preview the result and download it.

Open tool — Image Resizer
View all tools in this category