CSS Background Pattern Generator screenshot

CSS Background Pattern Generator

Generate a repeating CSS background pattern — stripes, dots, grid, checker or zigzag — from gradients only. Copy the rule. No images.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What the CSS background pattern generator builds

Every pattern is pure CSS: a background colour plus one or more gradient functions tiled with background-size. Stripes are a repeating linear gradient whose period is the stripe width, so there is no tile to size; dots use a radial gradient, a grid two one-pixel linear gradients crossing at right angles, and a checker a single conic gradient whose four quadrants alternate. The zigzag is four 45-degree gradients with one pair shifted by half a tile, the only pattern that needs background-position. Because nothing is an image, the pattern stays sharp at any zoom and adds no request. The honest limitation is that a very small tile on a very large element can look noisy or moiré on a high-density screen, and the zigzag depends on fractional tile alignment, which some older browsers render with a one-pixel seam.

How to use it

Pick a pattern, move the tile size slider and choose the two colours; the angle only affects stripes. Press Run to write the rule, and compare the tile size with the element the pattern will cover before copying it.

Worked example

Input:

type: stripes, size: 24px, colours: #0b1220 / #38bdf8, angle: 45deg

Output:

.pattern {
  background-color: #0b1220;
  background-image: repeating-linear-gradient(45deg, #38bdf8 0, #38bdf8 12px, #0b1220 12px, #0b1220 24px);
  background-size: auto;
}

Why it runs in your browser

The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.

Every pattern is pure CSS: a background colour plus one or more gradient functions tiled with background-size. Stripes are a repeating linear gradient whose period is the stripe width, so there is no tile to size; dots use a radial gradient, a grid two one-pixel linear gradients crossing at right angles, and a checker a single conic gradient whose four quadrants alternate. The zigzag is four 45-degree gradients with one pair shifted by half a tile, the only pattern that needs background-position. Because nothing is an image, the pattern stays sharp at any zoom and adds no request. The honest limitation is that a very small tile on a very large element can look noisy or moiré on a high-density screen, and the zigzag depends on fractional tile alignment, which some older browsers render with a one-pixel seam.

Generate a repeating CSS background pattern — stripes, dots, grid, checker or zigzag — from gradients only. Copy the rule. No images.

How to use it

Pick a pattern, move the tile size slider and choose the two colours; the angle only affects stripes. Press Run to write the rule, and compare the tile size with the element the pattern will cover before copying it.

Why it runs in your browser

The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.

What to Expect

What this tool keeps

  • The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.

Sample input

type: stripes, size: 24px, colours: #0b1220 / #38bdf8, angle: 45deg

Sample output

.pattern { background-color: #0b1220; background-image: repeating-linear-gradient(45deg, #38bdf8 0, #38bdf8 12px, #0b1220 12px, #0b1220 24px); background-size: auto; }

Frequently asked questions

How do I use the css background pattern generator?

Pick a pattern, move the tile size slider and choose the two colours; the angle only affects stripes. Press Run to write the rule, and compare the tile size with the element the pattern will cover before copying it.

Is my input uploaded?

Nothing is uploaded. The result is produced on this page.

Is there a size limit?

No: nothing is pasted, so there is no input size to exceed.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.