The quiet zone and print size
Every download from this site carries two facts you did not type: a border of light modules around the symbol, and — for PNG exports — a print-size readout beside each pixel preset. This guide explains what the quiet zone is, why cropping it is the most common self-inflicted scan failure, and how the readout turns a pixel count into inches and millimetres. Every number below is computed at build time by the same engine that runs the generator, on fictional sample inputs.
Related guides: how a QR code encodes data (where the version and module count come from), error correction and logos, and contrast and inverted codes. The full list is at /guides/.
Two layers, and where this guide sits
The methodology page separates a QR code into a payload — the text inside — and a symbol, the matrix produced to ISO/IEC 18004 by a vendored copy of the reference encoder. The quiet zone and the print size belong entirely to the symbol layer: they never change what the code says, only whether a camera can find the matrix and resolve its modules. A code with a mistyped WiFi password can have a flawless quiet zone and a generous print size. The engine validates format, not truth.
What the quiet zone is
A QR symbol is a square grid of modules, the smallest dark or light cells. The standard requires a margin of 4 light modules on all four sides of that grid, called the quiet zone, and the renderer here treats it as part of the symbol: it is drawn into every PNG and SVG download and cannot be disabled. Two details of how it is drawn matter in practice.
- It is not transparent, and it is not "empty". The renderer paints the whole image, quiet zone included, in the chosen background colour, then offsets every dark module inward by 4 modules. The margin is a painted region of the file.
- It is measured in modules, not pixels or millimetres. Its printed width depends on how large the symbol is printed, which is why the tables below give it per preset.
Because the band is 4 modules on each side, a symbol of 25×25 modules becomes an image of 33×33 modules. For a small symbol that is a large share of the picture: in the link example below, 24.2% of the image width is quiet zone.
Worked example
Built from the fictional address https://example.com/menu, the URL builder passes the address through unchanged:
https://example.com/menu
Rendered by the same engine as the generator — version 2, 25×25 modules, error correction M. With the quiet zone the image is 33×33 modules; the renderer's default SVG gives each module 8 px, so the file is 264 px square. The margin around the symbol is the quiet zone, drawn by the engine.
Why cropping it breaks a scan
Cropping the quiet zone is the most common self-inflicted scan failure. The standard defines the symbol to include its margin, so an image without one is not a complete symbol. The renderer has no option to omit it; cropping the download afterwards undoes that guarantee by hand. What is removed is not blank space around the code — it is part of the code.
The same loss happens without a cropping tool. Placing the code flush against a dark frame, a photograph or a coloured panel fills the margin with something other than the background colour, which has the same effect as removing it; a thin keyline drawn tight around the symbol counts. The WiFi generator page makes the same point for printed cards.
How the print-size readout is computed
The PNG size selector on every generator lists the engine's size presets, and beside each one
the readout from printSizeAt300Dpi. The arithmetic is two steps: the pixel width is
divided by 300 to give inches, and the inches are converted to millimetres. Nothing in the
readout depends on the payload — a given preset prints at the same size whether it holds a short link
or a long contact card. What differs is how many modules share those pixels.
| PNG preset | Width in inches | Width in millimetres | Readout shown in the generator |
|---|---|---|---|
| 512 px | 1.71 in | 43.3 mm | 1.71 in × 1.71 in (43.3 mm × 43.3 mm) at 300 DPI |
| 1024 px | 3.41 in | 86.7 mm | 3.41 in × 3.41 in (86.7 mm × 86.7 mm) at 300 DPI |
| 2048 px | 6.83 in | 173.4 mm | 6.83 in × 6.83 in (173.4 mm × 173.4 mm) at 300 DPI |
The readout measures the whole image, quiet zone included, because the PNG is drawn with the quiet zone inside it: the renderer divides the pixel width by the symbol size plus 4 modules on each side, and every module is drawn at that scale. The dark symbol is narrower than the readout by the two margin bands. For the link example, the 512 px file prints 43.3 mm wide with a 32.8 mm symbol inside; the 1024 px file prints 86.7 mm wide with a 65.7 mm symbol inside; the 2048 px file prints 173.4 mm wide with a 131.4 mm symbol inside.
What size does to a module
The presets are fixed; the module count is not. A longer payload needs a higher version, and a higher version is a larger grid, so at the same preset each module gets fewer pixels and fewer millimetres. The three fictional examples below were built by the payload builders and requested at the default level M; the level shown is the one the encoder actually chose, which it may raise above the request when that does not increase the version.
| Example | Version | EC level | Symbol (modules) | With quiet zone | Quiet zone, share of width |
|---|---|---|---|---|---|
| link | 2 | M | 25×25 | 33×33 | 24.2% |
| WiFi | 3 | M | 29×29 | 37×37 | 21.6% |
| contact card | 9 | M | 53×53 | 61×61 | 13.1% |
Dividing a preset's printed width by the module count gives the module pitch — the printed width of one module — and multiplying that by 4 gives the printed width of the quiet zone on each side.
| Example | PNG preset | Pixels per module | Module pitch | Quiet zone, each side | Dark symbol width |
|---|---|---|---|---|---|
| link | 512 px | 15.52 px | 1.31 mm | 5.25 mm | 32.8 mm |
| link | 1024 px | 31.03 px | 2.63 mm | 10.51 mm | 65.7 mm |
| link | 2048 px | 62.06 px | 5.25 mm | 21.02 mm | 131.4 mm |
| WiFi | 512 px | 13.84 px | 1.17 mm | 4.69 mm | 34.0 mm |
| WiFi | 1024 px | 27.68 px | 2.34 mm | 9.37 mm | 68.0 mm |
| WiFi | 2048 px | 55.35 px | 4.69 mm | 18.75 mm | 135.9 mm |
| contact card | 512 px | 8.39 px | 0.71 mm | 2.84 mm | 37.7 mm |
| contact card | 1024 px | 16.79 px | 1.42 mm | 5.69 mm | 75.3 mm |
| contact card | 2048 px | 33.57 px | 2.84 mm | 11.37 mm | 150.7 mm |
The pixels-per-module column is rarely a whole number. The PNG renderer places every module edge at a rounded pixel boundary, so adjacent modules never leave antialiasing seams even when the output size is not an integer multiple of the module count. Measured by handing the renderer a recording canvas at build time, the link example's dark modules are drawn 15 or 16 px wide at 512 px, 31 or 32 px wide at 1024 px, 62 or 63 px wide at 2048 px.
What the readout does not tell you
- Whether the code will scan. The readout is a property of the file. Error correction helps a damaged code scan, but print size and contrast still matter, and the engine cannot see the paper, the printer or the camera. Treat a freshly generated code as untested until a real device has scanned it.
- What happens at any other scale. The readout assumes 300 DPI. A layout program that stretches the image to fit a box changes the module pitch and the quiet-zone width in proportion.
- Anything about colour. The style panel evaluates the colour pair with the WCAG relative-luminance contrast formula and warns below 4.5:1, and warns separately for light-on-dark codes, which many scanners reject — see contrast and inverted codes.
- Which error-correction level to choose. Without a logo the level is selectable; with a logo the engine forces H. The level can change the version and so the module pitch, but the readout itself does not move — see error correction and logos.
- Whether the content is right. A wrong password encodes fine: a code that scans has proved its format, not its truth. The engine cannot know whether a WiFi password is correct, a phone number reachable, or a URL safe.
The SVG download
The SVG download is vector, so the pixel arithmetic above does not apply to it. The renderer
gives the file a nominal size — 8 px per module by default,
264 px square for the link example — and a matching viewBox, so it
scales to any dimension without pixelation. The quiet zone is 4 modules of that
viewBox: never lost by resizing, still lost by cropping or by artwork placed flush
against the symbol.
Common misreadings
- "The white border is padding I can trim." It is part of the symbol as the standard defines it, 4 modules wide, and the renderer will not produce a download without it.
- "A bigger PNG is a better code." It is the same code: version, module count and error-correction level are fixed by the payload and the encoder. A larger preset gives each module more pixels and prints larger at 300 DPI.
- "It scanned from my screen, so the print is fine." The screen scan tested the payload and the symbol, not the paper. Print size and contrast still matter; scan the printed copy with a real device before distributing it.
- "On my inverted code, the dark border is the quiet zone." It is — the quiet zone takes the background colour — and the light-on-dark warning applies to the whole code, because many scanners reject inverted codes.
- "It scans, so the content is right." The engine validates format, not truth. A wrong password, a stale link or a mistyped number produces a perfectly scannable symbol.
Quiet zone and print size FAQ
Can I turn the quiet zone off or make it smaller?
No. The 4-module border is rendered into every PNG and SVG download and cannot be disabled, because it is part of the symbol as ISO/IEC 18004 defines it. Trimming the margin removes the quiet zone; scaling the whole download, quiet zone included, keeps it.
Is the print-size readout the size of the dark symbol or of the whole image?
The whole image, quiet zone included. The readout divides the PNG width by 300 to get inches and converts that to millimetres; the dark symbol inside is narrower by the two quiet-zone bands. For the link example, 512 px prints 43.3 mm wide with a 32.8 mm symbol; 1024 px prints 86.7 mm wide with a 65.7 mm symbol; 2048 px prints 173.4 mm wide with a 131.4 mm symbol.
Does a bigger PNG hold more data?
No. The content is fixed by the payload, and the version and module count come from the encoder, not from the download size. A larger PNG only gives each module more pixels — 15.52 px per module at 512 px, 31.03 px per module at 1024 px, 62.06 px per module at 2048 px for the link example — so the same symbol prints larger at 300 DPI.
Does the readout tell me the code will scan at that size?
No. It states what size the file is when printed at 300 DPI — a property of the image, not a scan result. Error correction helps a damaged code scan, but print size and contrast still matter, and the engine cannot see the paper, the printer or the camera. Treat a freshly generated code as untested until a real device has scanned it.
My code is light on a dark background — is the dark border its quiet zone?
Yes, and that is the problem. The quiet zone takes the background colour, so on an inverted code it is a dark band 4 modules wide. The renderer draws it exactly as it would a light one, but the style panel warns separately for light-on-dark codes, which many scanners reject. The contrast guide covers both warnings.
What happens if I print the SVG instead of the PNG?
The SVG is vector. The renderer gives it a nominal size of 8 px per module (264 px square for the link example, quiet zone included), but it scales to any dimension without pixelation, and the quiet zone stays exactly 4 modules wide at every scale. The print-size readout belongs to the PNG presets only.
Test before you print: the quiet zone and the print-size readout describe the image file, not the scan — always scan a new code with a real device before printing or distributing it. The generator runs in your browser, and how each generator is built, tested, and verified is documented on the methodology page.