Background Pattern Generator
Pick a pattern, set the tile size, line or dot size and two colors, and copy one CSS rule that repeats the pattern seamlessly. Or download the tile as SVG.
background-color: #F5F3FF;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Crect width='24' height='24' fill='%23F5F3FF'/%3E%3Ccircle cx='12' cy='12' r='3' fill='%23A78BFA'/%3E%3C/svg%3E");
background-size: 24px 24px;How to use it
- Choose a pattern: polka dots, grid, diagonal stripes, checkerboard, zigzag, plus signs, waves or triangles.
- Set the tile size (the distance between repeats) and the line or dot size.
- Pick the pattern color and a background color, or make the background transparent to layer it over something else.
- Copy the CSS (background-image with an inline SVG) or download the SVG tile.
How CSS background patterns work
The pattern is one small SVG tile embedded in the CSS as a data URL and repeated with background-size. Because it is vector, it stays sharp on any screen and the whole rule is usually under 1 KB, with no image request. Use the tile size to control density: smaller tiles look busier.
Tips
- Keep pattern contrast low behind text (for example a light lilac on a lighter background), then check the text with the contrast checker.
- A polka dot pattern with dots at about 10-15% of the tile size reads as classic and calm.
- Combine with a gradient: CSS can layer the pattern on top of a gradient in one
backgrounddeclaration.
Frequently asked questions
How do I make a polka dot background in CSS?
Choose Polka dots, set the tile size and dot size, and copy the CSS. It repeats one SVG circle per tile with background-size, so the dots stay round and sharp at any size.
Is the downloaded SVG safe to use on my site?
Yes. The file contains only an svg element, shapes and colors written from a fixed template, with no scripts, fonts or external links.
Can I use it commercially?
Yes. What you make is generated in your browser from your settings; use it in personal or commercial work without credit.