CSS Gradient Generator
Design linear, radial or conic backgrounds with up to eight color stops. Adjust positions and transparency, copy ready-to-use CSS, or export a PNG at your chosen dimensions.
Build your gradient
Color stops
Positions are sorted automatically. Equal positions create a hard edge. Opacity runs from 0 to 100%.
PNG dimensions
64–3,200 pixels per edge; at most 8 million output pixels. CSS adapts to your element’s size; PNG uses the dimensions above. Radial uses a circle reaching the farthest corner.
Adjust a preset or create your own gradient.
See gradient ↓Gradient preview
Browser CSS sample
The canvas previews your PNG dimensions; this shallow CSS strip has a different aspect ratio. Small raster/interpolation differences can occur between browser CSS and canvas. Conic PNG export needs browser canvas conic-gradient support.
Back to settings ↑Gradients are generated locally with existing canvas helpers. No saved gradient history or processing upload. Website ads and analytics follow our privacy information.
Using CSS Gradient Generator
Build a reusable gradient background with editable stops and a preview before export.
- Choose a preset or a linear, radial or conic gradient. Set direction or center.
- Edit two to eight colors, opacity and positions. Reverse the gradient or space stops evenly.
- Set PNG dimensions, review the preview, then copy CSS or download PNG/settings JSON.
Example
Use Ocean blue at 90 degrees for a left-to-right website background. Use the Color wheel conic preset for a circular blend; set width and height equal for a square PNG.
Questions & answers
How do gradient angles work?
Linear CSS angles start with 0 degrees pointing upward and 90 degrees pointing right. Conic rotation starts at the top and moves clockwise; the center can be moved.
What does radial use?
A circle centered at your X/Y percentages, with its radius reaching the farthest corner of the output frame. This tool does not currently offer elliptical or repeating gradients.
Can I use transparent stops?
Yes. Set opacity from 0 to 100 percent for each stop. Colors export as hex with an optional alpha byte; PNG keeps transparency. The checkerboard is a preview background and is not included in the download.
Why do positions sort automatically?
Stops are rendered by increasing percentage. Equal positions keep their editor order and create a hard color edge. Evenly spaced stops redistributes positions from 0 to 100 percent.
Can I add more colors?
Yes. Use two to eight stops, remove extra stops, reverse colors and positions, or use a preset as a starting point.
Does PNG exactly match CSS everywhere?
PNG uses the entered dimensions and browser canvas rendering. CSS adapts to the element size. Small rasterization or interpolation differences can occur; aspect ratio and radial centers affect the appearance. The shallow CSS sample has a different aspect ratio from the output canvas.
What are the image limits?
64–3,200 whole pixels per edge, at most 8 million output pixels. Conic PNG creation requires canvas conic-gradient support in your browser.
Can I reopen JSON settings?
JSON is a readable record of normalized colors, positions, dimensions and CSS for sharing or reference. This version exports settings but does not import arbitrary JSON.
Is there a server upload?
No processing upload or saved gradient history is used. Canvas generation and downloads run locally. Website ads and analytics follow the privacy information.
Help improve this tool
Report a problem or suggest an improvement
Describe the issue without pasting private tool input. Feedback goes to our admin inbox.
