CSS Background Pattern Generator

Make stripes, dots, grids, checkerboards, zigzags and crosses as CSS backgrounds with your colours and tile size, with no image file needed.

Processed on your device. Files are not uploaded

How to make a CSS background pattern

  1. Pick a pattern

    Stripes, dots, grid, checkerboard, zigzag or crosses.

  2. Choose the colours and tile size

    The preview updates as you change them.

  3. Copy or download

    Paste the background rule into your stylesheet.

Worked example

This is what CSS Background Pattern Generator gives for its own sample values. Open the tool above and change anything to try your own.

Pattern
Diagonal stripes
Pattern colour
#99f6e4
Background colour
#f0fdfa
Tile size (px)
24

CSS

.pattern {
  background-color: #f0fdfa;
  background-image: repeating-linear-gradient(45deg, #99f6e4 0, #99f6e4 6px, transparent 6px, transparent 12px);
}

About CSS Background Pattern Generator

Make a repeating pattern from CSS gradients alone. There is no image to download, the pattern stays sharp at any zoom, and the colours are easy to change in code.

FAQs

Why use gradients instead of an image?

They load instantly, scale without blur and cost no extra request.

Can I animate it?

Yes. Animate background-position to make the pattern drift.

Is there an SVG version?

Yes. The SVG Pattern Generator makes a downloadable file with more shapes.

Related tools