CSS Pattern Generator
Build seamless stripes, dots, checks, grids and grain from gradients — copy the CSS or export an SVG tile.
Pattern family
dots · 32px tile · #2563eb / #ffffffPresets
Preview and export
1×1 tilesdots · 32px tile · #2563eb / #ffffff · preview updated
background-color: #ffffff; background-image: radial-gradient(circle at 2px 2px, #2563eb 1px, transparent 1.5px), radial-gradient(circle at 2px 2px, #2563eb 1px, transparent 1.5px); background-size: 32px 32px, 32px 32px; background-position: 0 0, 16px 16px; background-repeat: repeat;
Tailwind: bg-[radial-gradient(circle_at_2px_2px,_#2563eb_1px,_transparent_1.5px),radial-gradient(circle_at_2px_2px,_#2563eb_1px,_transparent_1.5px)] bg-[length:32px_32px,32px_32px] bg-[position:0_0,16px_16px]
Examples
Portfolio dots
Two colors, 24px tiletwo radial-gradients + background-size: 24px 24pxThe half-tile offset is exported alongside the images.
Dark checker
#1e293b / #334155, 48pxconic-gradient with four stopsThe canonical conic recipe keeps cells square at any tile size.
Fine grain
frequency 1.2, opacity 0.3stitched SVG data URIStitching prevents a visible edge where the noise tile repeats.
About this tool
The CSS Pattern Generator builds seamless repeating backgrounds from parameterized gradients, without raster assets or uploads. Eight families cover straight and diagonal stripes, quincunx dots, conic checkerboards, graph-paper grids, crosshatch, zigzag and feTurbulence grain. Each family exposes only the parameters that matter — colors, tile size, stroke thickness, stripe ratio, angle or noise frequency — and the constructor does the stop math.
The preview supports 1×1 and 3×3 tile views so a seam is immediately visible. Exports include the complete background stack: color, layered images, sizes and positions. Positions are not optional decoration — the dot quincunx and zigzag families depend on a half-tile offset, so the copied CSS reproduces exactly what the preview shows. Repeating gradients keep an automatic background size, which is what keeps angled stripes continuous.
Noise is generated as a self-contained SVG data URI with stitchTiles="stitch" and explicit sRGB filter color interpolation, preventing the visible edges of an unstitched turbulence tile. You can also download a standalone SVG tile: checkerboards and grids use rect geometry because SVG has no conic-gradient primitive. Twelve presets, randomize, a minified one-liner and Tailwind arbitrary-value classes round out the workflow.
What this tool does not do
- Families cap at three colors; more complex artwork belongs in an image editor.
- SVG export uses rect or linear-gradient fallbacks where SVG cannot express a CSS conic gradient.
- Noise renders through the browser's SVG filter pipeline, so exact grain differs slightly across engines.
How to use this tool
Pick a family
Choose stripes, diagonal, dots, checker, grid, crosshatch, zigzag or noise from the family rail.
Tune parameters
Set two or three colors and adjust tile size, thickness, ratio, angle or noise controls. The preview updates on every change.
Verify the seam
Toggle the 3×3 tile view. A visible join means a parameter combination is not tiling as expected.
Copy or download
Copy formatted CSS, a minified one-liner or Tailwind utilities, or download a standalone SVG tile.
Use cases
Empty states
Add a subtle dot or grid backdrop behind an illustration without shipping an image.
Hero sections
Use diagonal pinstripes or crosshatch for texture that stays crisp at any resolution.
Data-viz panels
Checkerboard and graph-paper tiles provide a neutral, high-contrast background.
Family geometry
| Family | Construction |
|---|---|
| Stripes / diagonal | repeating-linear-gradient at the chosen angle; background-size stays auto |
| Dots | Two radial-gradients offset by half a tile, background-size = tile size |
| Checker | conic-gradient(c1 25%, c2 0 50%, c1 0 75%, c2 0) at tile size |
| Grid | Two perpendicular linear-gradients with a line-thickness stop |
| Crosshatch | Two repeating ±45° gradients with transparent gaps |
| Zigzag | Four linear-gradient layers with half-tile offsets |
| Noise | SVG feTurbulence data URI with stitchTiles and sRGB interpolation |
Tailwind output uses underscores for spaces inside arbitrary values; commas and parentheses remain legal.
Common mistakes
Mistake:Copying background-image without background-size and position.
Fix:Use the full declaration block: dots and zigzag will not tile correctly without their offset.
Mistake:Adding background-size to repeating stripes.
Fix:The generator keeps repeating-gradient families at auto size so angled stripes stay continuous.
Mistake:Using an unstitched feTurbulence tile.
Fix:The noise export sets stitchTiles="stitch" and explicit width and height on the SVG.
Mistake:Choosing identical colors and wondering where the pattern went.
Fix:The interface flags invisible patterns when the two color pickers match.
Frequently asked questions
Why isn't my pattern tiling seamlessly?
Copy the whole declaration set, not just background-image. Dot and zigzag patterns depend on background-position offsets and every tiled family needs its background-size. Repeating-gradient families intentionally keep background-size: auto so angled stripes do not restart at a tile boundary.
How does the checkerboard conic-gradient work?
conic-gradient(c1 25%, c2 0 50%, c1 0 75%, c2 0) divides the tile into four quadrants. Combined with a square background-size, it repeats as a checkerboard without any image asset.
Can I use these patterns with Tailwind?
Yes. The Tailwind output supplies bg-[…] arbitrary values for the image, size and any needed position. Spaces inside arbitrary values become underscores; commas and parentheses stay as written.
Does a noise background hurt performance?
The SVG feTurbulence filter is rasterized once per tile and composited by the browser, so it is usually cheap for a modest tile. Avoid very large full-bleed noisy areas on low-power devices, and use the 0.6–1.2 baseFrequency range for a fine grain.
How do I export an SVG tile?
Choose Download SVG tile. Gradient families become a gradient-filled tile; checkerboards and grids use rect geometry because SVG has no conic-gradient primitive; noise exports the raw feTurbulence filter.
Why do my dots disappear?
The dot radius derives from the stroke control; at very small sizes or with identical colors the pattern becomes invisible. Increase the stroke size or pick two distinct colors — the interface flags identical color pairs.
References & standards
Related tools
Aspect Ratio Calculator
Calculate dimensions and ratios for images and videos.
Border Radius Generator
Visually craft CSS border-radius values — including the advanced 8-value slash syntax for organic blob shapes — with a live preview and one-click copy.
Box Shadow Generator
Visual CSS box-shadow generator. Create beautiful shadows with live preview and copy the CSS code.
CSS :has() Selector Playground
Try the CSS :has() parent selector on live editable HTML and CSS, with ten patterns, dropped-rule detection and specificity notes.
CSS Button Generator
Design buttons with hover, active, focus-visible and disabled states — gradients, shadows, borders, icons — and copy clean CSS or Tailwind.
CSS Clip-Path Generator
Draw clip-path shapes visually: drag polygon points, tune circle/ellipse/inset presets, paste an SVG path and copy responsive CSS.