SVG Pattern Generator
Create seamless SVG background patterns for free — no sign-up, no uploads, nothing to install. Choose from 12 pattern types, customise colours, spacing, and stroke, then copy the SVG or CSS with one click. Everything runs right in your browser.
Presets
SVG Code
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="400" viewBox="0 0 600 400">
<defs>
<pattern id="p" x="0" y="0" width="24" height="24" patternUnits="userSpaceOnUse">
<rect width="24" height="24" fill="#f8fafc"/>
<circle cx="12" cy="12" r="1.5" fill="#6366f1" opacity="1"/>
</pattern>
</defs>
<rect width="600" height="400" fill="url(#p)"/>
</svg>CSS Background
background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%0A%3Cdefs%3E%0A%20%20%3Cpattern%20id%3D%22p%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2224%22%20height%3D%2224%22%20patternUnits%3D%22userSpaceOnUse%22%3E%0A%20%20%20%20%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22%23f8fafc%22%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221.5%22%20fill%3D%22%236366f1%22%20opacity%3D%221%22%2F%3E%0A%20%20%3C%2Fpattern%3E%0A%3C%2Fdefs%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22url(%23p)%22%2F%3E%3C%2Fsvg%3E");
background-size: 24px 24px;
background-repeat: repeat;How It Works
This free SVG pattern generator builds your pattern entirely inside your browser — nothing is ever sent to a server.
-
1. Pick a pattern
Choose from 12 seamless pattern types — dots, grid, horizontal/vertical/diagonal lines, crosshatch, chevron, hexagons, triangles, waves, circles, and bricks. Or click any preset to load a curated combination of pattern, colours, and spacing instantly.
-
2. Set your colours
Click a colour swatch to open the browser's native colour picker, or type a HEX value directly. The Foreground Color controls the pattern elements themselves; the Background Color fills the space between them. The live preview at the top updates instantly.
-
3. Fine-tune spacing, size, and stroke
Use the Spacing slider to control how far apart tiles are, Element Size to scale individual shapes like dot radius or hexagon width, Stroke Width for line thickness, and Opacity to fade the pattern — great for subtle watermark-style backgrounds. Every change updates the preview in real time with no lag.
-
4. Copy the code or download the file
Click Copy SVG to grab the complete SVG markup — embed it directly in HTML or open it in Figma, Inkscape, or Illustrator. Click Copy CSS to copy a ready-to-paste
background-imagerule using an inline data URI — no separate file needed. Or hit Download SVG or Download PNG to save the pattern as a file. The 1200×800 PNG is rendered by the browser's Canvas API locally on your device.
Why users love this tool
- Instant live preview — the pattern updates in real time as you drag sliders, with no lag and no page reloads.
- Your data never leaves your device — all SVG code is generated on your computer using JavaScript and the browser's SVG and Canvas APIs. Nothing is uploaded or stored.
- Two output formats in one click — grab the raw SVG for design tools or the CSS snippet for your stylesheet — both are production-ready.
- No account or software needed — open the page and start creating straight away, for free.
Frequently Asked Questions
Does this tool upload anything to a server?
No. The SVG Pattern Generator runs entirely in your browser using JavaScript. All pattern code is generated on your device — nothing is transmitted to any server at any time.
Is this SVG pattern generator free?
Yes, completely free. No account, no sign-up, no watermarks, and no usage limits.
What is the difference between the SVG and CSS output?
The SVG output is a complete SVG file you can embed directly in HTML or open in a vector editor
like Figma, Inkscape, or Illustrator. The CSS output is a
background-image property using an inline data URI — paste it directly into a CSS
file to tile the pattern across any element.
Can I use these patterns in commercial projects?
Yes. The SVG and CSS code you generate is yours to use freely in personal and commercial projects — no attribution required.
How do I make the pattern tile correctly in CSS?
Paste the copied background-image value into your stylesheet and add
background-repeat: repeat; (or leave it at the default) along with
background-size set to your chosen spacing value in pixels. The pattern is
designed to tile seamlessly.
What pattern types are available?
12 seamless pattern types: dots, grid, horizontal lines, vertical lines, diagonal lines, crosshatch, chevron, hexagons, triangles, waves, circles, and bricks.
Related Design Tools
CSS Gradient Generator
Linear, radial & conic gradients
Color Palette Generator
Extract palettes from images
SVG Optimizer
Minify & clean SVG files
Hex / RGB / HSL Converter
Convert color code formats
CSS Box Shadow Generator
Layer & preview CSS shadows
Color Contrast Checker
WCAG AA / AAA compliance