ZapKit

CSS pattern generator

Make repeating background patterns from pure CSS: dots, grids, stripes, checks, zigzags and more, with your colours and spacing.

What is a CSS pattern generator?

A CSS pattern generator creates repeating background patterns using only CSS, without image files. Patterns like dots, grids and stripes add texture to empty areas, mark up diagrams and give pages a crafted, intentional feel.

Choose from eleven patterns, including polka dots, offset dots, grid lines, graph paper, checkerboard, diagonal, horizontal and vertical stripes, zigzag, plus signs and lined paper. Set the colours, spacing, line or dot thickness and opacity, preview it across the full width of the page, and copy the CSS.

How to use the CSS pattern generator

  1. 1.Pick a pattern

    Eleven patterns, from polka dots to graph paper.

  2. 2.Set colours and size

    Pattern and background colours, spacing, thickness and opacity.

  3. 3.Copy the CSS

    Paste it onto any element's background.

Example: dotted background for a hero

Polka dots at the default settings:

Pattern
Polka dots
Spacing
24px
Dot size
3px
Colours
blue at 60% on #f6f7fa

An even field of small blue dots behind a heading, drawn entirely by CSS.

No image files

Every pattern is drawn by the browser from CSS gradients, so there's nothing extra to download, it's sharp on high-resolution screens, and colours can be changed later by editing the CSS. Plus signs use a tiny inline SVG instead, written into the same CSS.

Lowering the pattern opacity is the easiest way to make it subtle enough to sit behind text. Graph paper and lined paper suit note-taking apps, while dots and grids work well behind diagrams and empty states.

Frequently asked questions

Will the pattern line up across sections?

Patterns start from each element's corner. Give sections the same background-position if you need them aligned.

Can I layer a pattern over a gradient?

Yes. Add your gradient as another value in background-image.

Does it work in old browsers?

All current browsers support it. The checkerboard uses conic-gradient, which very old browsers lack.

Can I share a pattern?

Yes. Settings are saved in the page address.

More Developer tools