The SVG Pattern Generator creates a small vector tile that repeats across a larger preview, with dots, grids, diagonal lines, or waves controlled by tile size, shape width, foreground, and background.
Use the SVG Pattern Generator when you need a synchronized CSS background, standalone SVG tile, or downloaded tile without uploading assets or manually writing path markup. The most important tuning decision is simple: tile size sets the interval between repeats, while shape width sets a style-dependent visual weight.

Understand the tile-and-repeat model
Each generation produces three synchronized results: a live repeated preview, standalone SVG tile markup, and CSS that references the same tile. The preview is not a large screenshot or a downloadable image; it demonstrates how one compact square tile will look when repeated. Previewing, copying, and download preparation all happen in the current browser tab, so the pattern is not uploaded or hosted by the tool.
The SVG includes an explicit width, height, viewBox, a full-tile background rectangle, and one motif element. The CSS embeds that exact SVG as a percent-encoded data URL and supplies a matching background size. CSS performs the visual repeat; the exported file is not wrapped in an internal SVG pattern element. For the separate SVG pattern model, see the W3C SVG 2 pattern specification and MDN’s SVG pattern element reference.
Control the repeat interval
Tile size accepts whole numbers from 8 through 128 pixels. It controls the repeat interval in both horizontal and vertical directions because every source tile is square. A smaller value packs more motifs into the same area, while a larger value leaves more visual space around each repeat.
Use the lower part of the range when you want a denser decorative field and move toward the upper part when the background should feel more open. The control does not determine the final appearance by itself: pattern style, foreground and background contrast, and shape width still affect how dense the result looks. Inspect the repeated preview at approximately the size where the pattern will be used rather than judging the number alone.
Read shape width by style
Shape width accepts values from 1 through 12 pixels, but its meaning changes with the selected style. For dots, it changes the circle radius. For grid, diagonal lines, and waves, it changes the stroke width. Equal numeric values therefore do not guarantee equal perceived weight, particularly when the foreground and background have strong contrast.
| Style | How shape width behaves | Defined tile geometry |
|---|---|---|
| Dots | Changes the circle radius | Places one circle at the center of the square tile |
| Grid | Changes the stroke width | Draws the top and left edges so neighboring copies complete a regular lattice without double-width interior lines |
| Diagonal | Changes the stroke width | Uses several parallel segments that cross tile boundaries, allowing the stripe rhythm to continue |
| Waves | Changes the stroke width | Uses one quadratic curve followed by a smooth quadratic continuation across the tile |
The geometry is deterministic, but the visible result still depends on the selected colors and rendering environment. Compare the shape-width setting with the repeated preview, and make another adjustment when the motifs feel too heavy, too faint, or uneven.
Build a pattern for immediate use
- Open the SVG Pattern Generator and select dots, grid, diagonal lines, or waves.
- Set the tile size to a whole number from 8 to 128 pixels. This sets the horizontal and vertical repeat interval.
- Set the shape width from 1 to 12 pixels, remembering that it means radius for dots and stroke width for line-based styles.
- Enter a foreground and background color as six-digit HEX values. Both are required, and the generated output normalizes them to lowercase.
- Inspect the live repeated preview at approximately the final display size. Check the spacing, motif weight, color separation, and joins between neighboring tiles.
- Choose the output you need: copy the synchronized CSS, copy the standalone SVG markup, or download the SVG tile.
- Apply the result in the destination. If clipboard access is denied, manually select the visible read-only output. If a Content Security Policy blocks the CSS data URL, serve the downloaded tile as an approved asset and replace the data URL with that asset URL.
The interface constrains normal inputs to the supported ranges, while the generator itself rejects unsupported styles, malformed colors, and out-of-range values instead of silently repairing them. Rebuilding with identical controls produces byte-for-byte identical SVG and CSS output, so the chosen settings can be retained with the project.
Choose colors for the final surface
Foreground controls the visible motif, while the background color fills the tile behind it. Because both values become part of a compact SVG tile, changing either color updates the live preview, standalone markup, and CSS together. A strong foreground-background contrast makes motif boundaries easier to judge, but it can also make antialiasing differences more noticeable along diagonal strokes.
If the pattern needs to belong to a broader design, use the Color Palette Generator to choose candidate colors before returning to the pattern settings. When the pattern sits behind text, use the Color Contrast Checker to assess the foreground and background pair separately; readable text does not by itself prove that the pattern will render smoothly.
Match the output to the destination
| Output | What it contains | Practical use |
|---|---|---|
| CSS | Background color, a percent-encoded SVG data URL, and matching background size | Directly apply a repeating CSS background where data URLs are allowed |
| Standalone SVG markup | The generated square tile with explicit dimensions, viewBox, background rectangle, and motif | Use when the vector tile markup itself is needed |
| Downloaded SVG tile | The same compact source tile shown in the markup field | Save it for an approved asset workflow and reference it with a hosted URL |
The CSS data URL avoids a separate image request because the exact SVG is embedded in the declaration. That convenience does not override the destination’s rules: a Content Security Policy, sanitizer, email client, or CMS may block it. The generator does not host the file for you, so an approved static-asset URL is required in that case.
Copy CSS and Copy SVG request clipboard permission separately, and a successful message identifies the format copied. If permission is denied, both outputs remain visible for manual selection and the tool does not claim success. The downloaded file is also not the larger preview; see whether the downloaded SVG pattern file is the whole preview for the distinction.
Test rendering and policy constraints
Geometry that aligns across tile boundaries can still reveal visible seams because antialiasing, scaling, and the final rendering environment affect the edges. Fractional layout scaling or browser zoom can make one-pixel strokes appear uneven. Very large stroke widths can dominate small tiles, and sharply contrasting diagonals may expose antialiasing differences at boundaries. Test the final CSS size and device pixel ratio, then check the pattern in the actual page, component, or email template where it will appear.
Destination policy is part of the test, not an afterthought. If the data URL is blocked, do not assume that copying the same CSS will solve the problem; use the downloaded tile, serve it through an approved route, and update the background-image value. This keeps the vector geometry while adapting the delivery method to the destination.
Know what this generator leaves out
This is a focused generator for dots, grids, diagonal lines, and waves. It does not create photographic textures, noise, checkerboards with independently sized cells, custom path uploads, rotations, gradients, masks, animation, or multi-layer compositions. The generated SVG is concise and deterministic, but it is not minified beyond that deterministic markup.
The tool is well suited to prototypes, small decorative surfaces, placeholders, badges, cards, and controlled site themes. It does not guarantee print registration, texture randomness, perceptual uniformity, accessibility, or compatibility with software that rasterizes SVG differently. Those distinctions matter when choosing between a generated geometric tile and a more specialized texture workflow.