HomeLibrarySVG background patterns

SVG background patterns

Seamless SVG background patterns as single copy-paste CSS background values: dots, stripes, grids, waves, and more. The tile is inlined as a data URI, so there is no extra request and nothing to host. Click a card to copy, then swap the two hex colors in the value to match your palette.

Polka Dots
#0f172a url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%3E%3Ccircle%20cx%3D%276%27%20cy%3D%276%27%20r%3D%272.5%27%20fill%3D%27%2360a5fa%27%20fill-opacity%3D%270.35%27%2F%3E%3Ccircle%20cx%3D%2718%27%20cy%3D%2718%27%20r%3D%272.5%27%20fill%3D%27%2360a5fa%27%20fill-opacity%3D%270.35%27%2F%3E%3C%2Fsvg%3E") repeat
Diagonal Stripes
#0f172a url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2720%27%20height%3D%2720%27%3E%3Cpath%20d%3D%27M-5%205%20L5%20-5%20M-5%2025%20L25%20-5%20M15%2025%20L25%2015%27%20stroke%3D%27%2360a5fa%27%20stroke-opacity%3D%270.35%27%20fill%3D%27none%27%20stroke-width%3D%274%27%2F%3E%3C%2Fsvg%3E") repeat
Grid
#0f172a url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2728%27%20height%3D%2728%27%3E%3Cpath%20d%3D%27M28%200%20H0%20V28%27%20stroke%3D%27%2360a5fa%27%20stroke-opacity%3D%270.35%27%20fill%3D%27none%27%20stroke-width%3D%271.5%27%2F%3E%3C%2Fsvg%3E") repeat
Checkerboard
#0f172a url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2728%27%20height%3D%2728%27%3E%3Crect%20x%3D%270%27%20y%3D%270%27%20width%3D%2714%27%20height%3D%2714%27%20fill%3D%27%2360a5fa%27%20fill-opacity%3D%270.35%27%2F%3E%3Crect%20x%3D%2714%27%20y%3D%2714%27%20width%3D%2714%27%20height%3D%2714%27%20fill%3D%27%2360a5fa%27%20fill-opacity%3D%270.35%27%2F%3E%3C%2Fsvg%3E") repeat
Plus Signs
#0f172a url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2730%27%20height%3D%2730%27%3E%3Cpath%20d%3D%27M13%206h4v7h7v4h-7v7h-4v-7H6v-4h7z%27%20fill%3D%27%2360a5fa%27%20fill-opacity%3D%270.35%27%2F%3E%3C%2Fsvg%3E") repeat
Zigzag
#0f172a url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2728%27%20height%3D%2714%27%3E%3Cpath%20d%3D%27M0%2010%20L7%203%20L14%2010%20L21%203%20L28%2010%27%20stroke%3D%27%2360a5fa%27%20stroke-opacity%3D%270.35%27%20fill%3D%27none%27%20stroke-width%3D%272.5%27%2F%3E%3C%2Fsvg%3E") repeat
Waves
#0f172a url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2740%27%20height%3D%2716%27%3E%3Cpath%20d%3D%27M0%208%20Q10%200%2020%208%20T40%208%27%20stroke%3D%27%2360a5fa%27%20stroke-opacity%3D%270.35%27%20fill%3D%27none%27%20stroke-width%3D%272.5%27%2F%3E%3C%2Fsvg%3E") repeat
Triangles
#0f172a url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2730%27%20height%3D%2726%27%3E%3Cpath%20d%3D%27M15%204%20L26%2022%20H4%20Z%27%20stroke%3D%27%2360a5fa%27%20stroke-opacity%3D%270.35%27%20fill%3D%27none%27%20stroke-width%3D%272%27%2F%3E%3C%2Fsvg%3E") repeat
Hexagons
#0f172a url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2728%27%20height%3D%2748%27%3E%3Cpath%20d%3D%27M14%202%20L26%209%20V23%20L14%2030%20L2%2023%20V9%20Z%20M14%2030%20V46%27%20stroke%3D%27%2360a5fa%27%20stroke-opacity%3D%270.35%27%20fill%3D%27none%27%20stroke-width%3D%272%27%2F%3E%3C%2Fsvg%3E") repeat
Crosshatch
#0f172a url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2722%27%20height%3D%2722%27%3E%3Cpath%20d%3D%27M-4%204%20L4%20-4%20M-4%2026%20L26%20-4%20M18%2026%20L26%2018%20M26%204%20L18%20-4%20M26%2026%20L-4%20-4%20M4%2026%20L-4%2018%27%20stroke%3D%27%2360a5fa%27%20stroke-opacity%3D%270.35%27%20fill%3D%27none%27%20stroke-width%3D%271.5%27%2F%3E%3C%2Fsvg%3E") repeat
Rings
#0f172a url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2736%27%20height%3D%2736%27%3E%3Ccircle%20cx%3D%2718%27%20cy%3D%2718%27%20r%3D%2710%27%20stroke%3D%27%2360a5fa%27%20stroke-opacity%3D%270.35%27%20fill%3D%27none%27%20stroke-width%3D%272.5%27%2F%3E%3Ccircle%20cx%3D%270%27%20cy%3D%270%27%20r%3D%276%27%20stroke%3D%27%2360a5fa%27%20stroke-opacity%3D%270.35%27%20fill%3D%27none%27%20stroke-width%3D%272%27%2F%3E%3Ccircle%20cx%3D%2736%27%20cy%3D%270%27%20r%3D%276%27%20stroke%3D%27%2360a5fa%27%20stroke-opacity%3D%270.35%27%20fill%3D%27none%27%20stroke-width%3D%272%27%2F%3E%3Ccircle%20cx%3D%270%27%20cy%3D%2736%27%20r%3D%276%27%20stroke%3D%27%2360a5fa%27%20stroke-opacity%3D%270.35%27%20fill%3D%27none%27%20stroke-width%3D%272%27%2F%3E%3Ccircle%20cx%3D%2736%27%20cy%3D%2736%27%20r%3D%276%27%20stroke%3D%27%2360a5fa%27%20stroke-opacity%3D%270.35%27%20fill%3D%27none%27%20stroke-width%3D%272%27%2F%3E%3C%2Fsvg%3E") repeat
Bricks
#0f172a url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2736%27%20height%3D%2724%27%3E%3Cpath%20d%3D%27M0%206%20H36%20M0%2018%20H36%20M18%206%20V0%20M18%2018%20V6%20M9%2018%20V24%20M27%2018%20V24%27%20stroke%3D%27%2360a5fa%27%20stroke-opacity%3D%270.35%27%20fill%3D%27none%27%20stroke-width%3D%272%27%2F%3E%3C%2Fsvg%3E") repeat

FAQ

How do I use one of these values?
Paste it as the background of any element, for example body { background: …; } or a hero section. The value bundles a background color, the pattern tile as a data URI, and repeat, so a single declaration is enough. The tile repeats seamlessly in both directions.
How do I change the colors?
Each value contains exactly two colors: the background hex at the front, and the pattern hex inside the data URI (it appears URL-encoded, %23 stands for the # sign). Replace both with your palette. For a subtler texture, lower the fill-opacity or stroke-opacity value inside the URI instead of changing the color.
Does a data URI background cost a network request?
No. The SVG travels inside the CSS itself, so there is no extra request, no file to host, and no flash of missing background. The tiles here are tiny (a few hundred bytes), well below the point where a data URI becomes a size concern.
Can I scale the pattern?
Yes. Add background-size to the same element, for example background-size: 48px 48px doubles a 24px tile. Keep the ratio of the original tile (width and height are in the value you copied) so the tiling stays seamless.
Family Site