Seamless dots, grids, stripes, waves and more as SVG, CSS or PNG
CSS Pattern Generator
Add a background pattern with a few lines of CSS and no image files at all.
Loading tool…
How to use css pattern generator
Choose a pattern such as grid, dots, lined paper or checkerboard.
Set the repeat size, line width or dot radius, and the angle for stripes.
Pick the pattern and background colours, or try one of the quick themes.
Copy the CSS into your stylesheet.
What this tool does
- Every pattern is built from linear, radial, repeating or conic gradients, so there is nothing to download or host.
- The preview box uses exactly the CSS shown, property for property.
- Ten patterns: dots, offset polka dots, grid, lined paper, angled stripes, checkerboard, crosshatch, zigzag, boxes and triangles.
- Accepts any CSS colour, including translucent ones for overlays.
How the result is verified
The preview is styled with the generated declarations themselves, so what you see is what the CSS draws in your browser.
Frequently asked questions
Are CSS gradient patterns slow?
No. Browsers draw gradients on the GPU and cache them. Very many stacked layers on a huge element can cost a little when scrolling, but these patterns use one to four layers.
How do I put a pattern behind content?
Paste the declarations into the rule for the element, such as body or a section. The background colour is part of the output, so the pattern shows straight away.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
Linear, radial and conic gradients with OKLCH blending, CSS and PNG
Grain texture as a tiny inline SVG filter in your CSS
Mesh, gradient and glow wallpapers with grain and patterns, up to 8K