Start a project

Tool 114 of 450 · Backgrounds

CSS Pattern Background Generator

Create stripes, dots, grids, checkerboards and zigzags with pure CSS gradients and copy the code.

CSS Pattern Background Generator

Your input

Result

PropertyValue
CSS

01

What it does

Create stripes, dots, grids, checkerboards and zigzags with pure CSS gradients and copy the code.

  • 10 patterns: stripes, diagonal stripes, dots, polka dots, grid, graph paper, checkerboard, zigzag, diamonds and crosses
  • Colours, tile size, line thickness and angle
  • Pure CSS gradients: no image requests
  • Longhand CSS that's easy to tweak

02

Private by design

Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

03

What you get

Live pattern and background CSS, with a Copy and a Download button on every result.

  • CSS gradients
  • Patterns
  • Backgrounds

Why it matters

A pattern made from gradients costs a few hundred bytes of CSS instead of an image request, stays sharp on every screen and can use your CSS variables.

The maths behind tile sizes and colour stops is fiddly, which is why most people copy one from a gallery; this builds it from your own sizes and colours.

How to use it

  1. Type or paste your input; the example shows the format.
  2. Press Generate pattern. Results also update as you type.
  3. Read the summary line, then the table, notes or output below it.
  4. Copy or download what you need. Nothing leaves this page.

FAQ

Do gradient patterns hurt performance?

Not on their own. Very small tiles on huge areas can be slower to paint, so keep tiles above about 8px on full-page backgrounds.

Can I use CSS variables for the colours?

Yes. Replace the hex values in the output with var(--your-colour).

Why are the edges a little soft?

Gradient stops are anti-aliased. For dots the code adds a half-pixel soft edge on purpose so they don't look jagged.

Is my input uploaded?

No. The tool runs in your browser and nothing you type, paste or open is sent anywhere.

Can I rely on the result?

It follows the public specification or formula named on this page and says where it simplifies. Check anything critical against the official tool or documentation before you ship it.

Work with me

Want a site that gets these right?

I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

All developer tools · Back to leej.uk