Code · Made a little simpler
CSS Pattern Library
Customize repeating CSS backgrounds such as dots, stripes, grids and checkerboards. Set colors and spacing, then preview and download CSS.
Build Repeating CSS Background Patterns
Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device
CSS Pattern Library: how to use it
- Choose Dots, Stripes, Grid, Checkerboard or Crosshatch from the pattern swatches.
- Choose the pattern and background colors. Adjust the repeat size, then set mark thickness or angle where available.
- Compare the preview at several spacings and download pattern-background.css. Apply the class to the element you want to decorate.
Limits and notes
Runs in your browser. Uses CSS gradients with six-digit sRGB hex colors. Sets repeat sizes from 4–120 px. Dots, grids and checkerboards use square tiles.
How your privacy works →CSS Pattern Library: common questions
Will the pattern stay sharp if my container gets wider?
CSS generates the gradient in the browser and repeats the same geometry across the available area. The pixel spacing stays the same.
Why does changing repeat size also change a checkerboard square?
The tile has four equal squares. Each square is half the tile width, so both grow together.
Can I use these backgrounds without downloading an image?
Yes. The exported CSS draws the design with gradients. It contains the selected colors and geometry with no image URL.