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.
Build a gradient
- Choose Linear and an angle, or Radial with a shape, extent and center.
- 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.
- 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
Sources and method
These CSS specifications provide context for gradient geometry, color interpolation and serialization.
- W3Cw3.orgCSS Images 3Gradient angles, stops and radial geometry.
- W3Cw3.orgCSS Images 4Gradient syntax and interpolation methods.
- W3Cw3.orgCSS Color 4Color interpolation and premultiplied alpha.
- W3Cw3.orgCSSOMSerialization of CSS values.
The editor's one-decimal subset is a product choice. These documents do not certify browser support or rendering accuracy.
Related tools
SVG to PNG
Convert a local SVG file or pasted markup into PNG, with explicit dimensions, transparency and bundled fonts.
Open tool — SVG to PNGCSS Filter Generator
Order and repeat CSS effects, compare a specimen and copy the exact filter declaration.
Open tool — CSS Filter GeneratorFluid Font Size Calculator
Create root-relative CSS from viewport endpoints and inspect the copied size model.
Open tool — Fluid Font Size CalculatorCSS Button Generator
Style native button states, inspect keyboard focus and copy HTML and CSS.
Open tool — CSS Button GeneratorCSS Border Radius Generator
Edit eight corner radii, preview a box and copy CSS in pixels or percentages.
Open tool — CSS Border Radius GeneratorCSS 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 GeneratorCSS 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 GeneratorCSS Text Shadow Generator
Build ordered text shadows, preview plain text and copy exact CSS.
Open tool — CSS Text Shadow GeneratorCSS 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 GeneratorCSS Box Shadow Generator
Create ordered CSS box-shadow layers with a live preview and copyable code.
Open tool — CSS Box Shadow GeneratorImage 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 WatermarkColor Converter
Convert supported sRGB HEX, RGB and HSL literals with alpha, explicit precision and current code Copy.
Open tool — Color ConverterImage 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 ReaderColor 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 CheckerPrint Size & Resolution Calculator
Calculate print dimensions, required pixels and effective PPI with fit or crop.
Open tool — Print Size & Resolution CalculatorAspect Ratio Calculator
Find a width-to-height ratio or calculate a matching pixel size from one target dimension.
Open tool — Aspect Ratio CalculatorImage Compressor
Try to fit a JPEG, PNG or WebP within a target file size, with measured results and optional smaller dimensions.
Open tool — Image CompressorHEIC 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 JPGImage 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 ConverterPhoto Collage Maker
Arrange local photos in a grid, adjust crops and spacing, and download PNG or JPEG.
Open tool — Photo Collage MakerRotate & 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 ImagesImage Cropper
Crop one local JPEG, PNG or WebP to exact pixels with visual and numeric controls. Download PNG or JPEG.
Open tool — Image CropperImage Resizer
Resize a JPG, PNG or WebP image by pixels or percentage, preview the result and download it.
Open tool — Image Resizer