How to Make a Repeating SVG Pattern
An SVG pattern is one tile, defined once, repeated across whatever references it. It handles shapes CSS gradients cannot, stays sharp at any size, and can be rotated independently of the element it fills. One attribute decides whether the tile size means what you think it means.
Choose a shape, a tile size and colours. The pattern is emitted with patternUnits set to userSpaceOnUse, so the tile is measured in pixels.

Workflow Lifecycle & Pipeline
Visual execution flow showing how SVG Pattern Generator processes data directly in your local browser sandbox.
SVG Pattern Generator Interactive Process Pipeline
Fast, zero-latency execution directly in your browser memory.
Before You Start
Ensure your source assets and browser environment meet the verified execution requirements.
Step-by-Step Instructions
Follow these verified steps to execute the task with SVG Pattern Generator.
Enter shape
Fill in shape, tile size (px) and shape size (%), plus the 3 below. Each starts at a usable value, so you can change one and leave the rest.
Shape Dots · Tile Size (px) 24 · Shape Size (%) 306 fields read as you typeWatch the result change
There is no button on SVG Pattern Generator: the result follows the input as you change it.
Updates as you typeSVG Pattern Generator runs on your deviceCopy the answer
The answer sits at the top of the result panel with a copy button beside it. It never left your browser.
Copy the figureOn your clipboardUnder the Hood: Sandboxed WASM Execution & Isolated Web Workers
Development tools and code sandboxes execute inside sandboxed Web Workers with isolated thread runtimes. Code scripts cannot access DOM scopes, cookies, or local network interfaces, providing high security and bare-metal performance.
Real-Time Stdin Stream
Interactive inputs pipe directly into std::cin, sys.stdin, and ReadLine buffers via simulated virtual teletypes.
Zero Egress Guarantee
Algorithm logic, API keys, and test queries remain confined to the client virtual machine.
Near-Native CPU Performance
Precompiled WebAssembly modules execute with near-native JIT performance on V8 and SpiderMonkey engines.
Settings & Options Explained
Fine-tune quality, format, and compression parameters for your exact workflow.
Settings & Configuration Guide
| Setting | Recommended Value | How It Works & Impact |
|---|---|---|
| Shape | Dots | Takes one of Dots, Lines, Crosses, Triangles or Squares. Impact: Each option is a different shape; switching it changes the result, not the speed. |
| Tile Size (px) | 24 | Takes a number from 4 to 200. Impact: The control runs from 4 to 200; 200 is as far as it goes. |
| Shape Size (%) | 30 | Takes a number from 5 to 90. Impact: The control runs from 5 to 90; 90 is as far as it goes. |
| Shape Colour | #4f46e5 | Takes a colour. Impact: Read as written, so stray spaces and characters count. |
| Background Colour | #ffffff | Takes a colour. Impact: Read as written, so stray spaces and characters count. |
| Rotation (deg) | 0 | Takes a number from 0 to 360. Impact: The control runs from 0 to 360; 360 is as far as it goes. |
Best Practices & Key Considerations
Avoid common quality pitfalls and maximize output performance.
Expert Recommendations
- patternUnits="userSpaceOnUse" makes the tile size pixels. The default treats it as a fraction of the filled shape, which is why hand-written patterns come out stretched.
- patternTransform rotates the tile inside the shape, leaving the shape upright. Rotating the element turns everything.
- Give the pattern a unique id if the page holds more than one — ids are global, and two patterns called p will fight.
Common Mistakes to Avoid
- Expecting Tile Size (px) to go past 200 — 4 to 200 is the range the control offers.
- Expecting Shape Size (%) to go past 90 — 5 to 90 is the range the control offers.
- Leaving Shape on Dots when Lines or Crosses was wanted.
- Assuming the input is sent somewhere — SVG Pattern Generator runs in this tab, and nothing you enter leaves it.
Troubleshooting & Fixes
Quick solutions for common browser constraints, format issues, and edge cases.
Troubleshooting & Common Issues
Tile Size (px) will not go above 200
Possible Cause: The control runs from 4 to 200.
Shape Size (%) will not go above 90
Possible Cause: The control runs from 5 to 90.
The answer is right but not in the form you wanted
Possible Cause: Shape is set to Dots, and it decides that.
Frequently Asked Questions
Everything you need to know about formats, privacy, and browser support.
Related Step-by-Step Guides
Explore companion workflows, optimization techniques, and verified tutorials.