Will it scan? Print size, quiet zone and contrast for QR codes
Why a QR code that scans perfectly on screen fails on a printed label, and the numbers that decide it: size, module width, quiet zone, contrast and logos.
By The QRtoMany team6 min read
Almost every QR code that fails in the field looked fine before it was printed. It scanned from the designer's monitor and from the PDF proof, and the print shop approved it. Then it went on a beer label, a table tent or a shop window, and people started tapping the screen and giving up.
The reason is that a screen is a forgiving place to test a code. It glows, it is flat, it has a white border around it, and you test it from a few centimetres away. Print is none of those things. This post covers the physical limits that decide whether a printed code scans, and the numbers our designer checks before it lets you export.
How a phone reads a code
A QR code is a grid of square modules, dark or light. To read it, the phone:
- finds the three large squares in the corners, the finder patterns, to locate the code and work out its angle;
- divides the area between them into the grid;
- samples the centre of every module and decides whether it is dark or light;
- uses the code's built-in error correction to rebuild whatever it misread.
Every rule below protects one of those steps.
Size: a tenth of the scanning distance
The common rule of thumb is that a code should be about one tenth as wide as the distance it is scanned from. A code on a menu read from 30 cm away needs to be about 3 cm wide. A poster read from 2 m needs about 20 cm. The rule works from a table tent up to a billboard because it is really about the angle the code takes up in the camera's view, not about any particular size.
That rule alone is not enough, because it ignores how much is packed into the code.
Module size: the limit people miss
The more content a code holds, the more modules it needs. A short link fits in a small grid. A contact card with a full postal address needs a far bigger one. Print both at the same width and each module in the dense code is much smaller.
Below a certain module width, a phone camera stops resolving the modules reliably, and the result depends on the light, the camera and how steady the hand is. We use 0.4 mm as our floor. That is deliberately stricter than print standards allow for laser scanners on packaging, because a person's phone at arm's length is what actually scans these codes.
So the minimum size of a code is the larger of two numbers: a tenth of the scanning distance, and its module count multiplied by 0.4 mm. Here are both worked out by the same validator our designer runs, for one of our dynamic codes:
| Scanned from | Code | With quiet zone | Module |
|---|---|---|---|
| 30 cm | 30.0 mm | 39.6 mm | 1.20 mm |
| 1 m | 100.0 mm | 132.0 mm | 4.00 mm |
| 2 m | 200.0 mm | 264.0 mm | 8.00 mm |
| 5 m | 500.0 mm | 660.0 mm | 20.00 mm |
The two limits call for different fixes. If the distance sets the size, print the code bigger. If the module width sets it, making the code bigger works too, but shortening the content usually works better. That is one quiet advantage of a dynamic code: however long your destination URL is, the code only ever holds a short link.
The quiet zone: four modules of nothing
A code needs an empty margin around it, called the quiet zone, so the phone can tell where the code ends and the surroundings begin. The QR standard asks for four modules on every side.
This is the single most common cause of a code that will not scan, and it survives every on-screen test. A screenshot has white space around it, so it scans. A label printed right up to the edge of a coloured panel does not.
Two practical consequences:
- Measure the artwork, not the code. The size to lay out is the code plus its quiet zone. In the table above, the "with quiet zone" column is the one to give your designer.
- Nothing goes in the margin. No text, no border, no pattern from the packaging behind it.
Our exports always include the four-module margin. If you ask for less, we raise it to four and tell you, so your layout isn't built around a number that isn't what gets printed.
Contrast: dark on light, and enough of it
The phone decides dark or light for every module, so the two colours need to be clearly different after printing, under the lighting where the code will be scanned.
- We require a contrast ratio of at least 3:1 between the modules and the background, and we block an export below that until you explicitly acknowledge it. Below 3:1, a code scans on a desk and fails on a dim restaurant table.
- At 7:1 or more we are confident rather than hopeful. Black on white is 21:1.
- With a gradient, what counts is the weakest pair of colours in it, not the average.
Keep the modules darker than the background. Light modules on a dark background ("inverted") read on many phones but not all, even with excellent contrast. We warn rather than block, because it is a real risk with a cheap fix.
Some other ways good contrast is lost after printing:
- Transparent backgrounds. Contrast then depends on whatever the code is printed on. We warn you to check it against the final material.
- Metallic, glossy or curved surfaces. Glare can wash out a whole row of modules. Matte finishes and flat placement help.
- Absorbent stock. Ink spreads on uncoated paper and fabric, which makes dark modules bleed into light ones. Bigger modules leave more room for it.
Logos: spending the error correction
Error correction lets a phone rebuild the parts of a code it cannot read. It comes in four levels, and the highest, H, can recover about 30% of the code. A logo in the middle works by deliberately destroying modules and relying on error correction to rebuild them.
So we do three things whenever a code has a logo:
- The error correction is raised to H automatically, whatever you picked. Adding a logo to a low-correction code silently removes data the phone needs, and nothing in the preview shows it.
- The logo may use only half of H's recovery budget. The rest is kept for the real world: a scuff, a fold, a fingerprint, ink spread, a bad angle. That limits the logo, including its clear padding, to about 30% of the code's width — a logo of up to 25% with the default padding.
- The code gains modules to make room. A short link makes a small code, and a logo covers a large share of a small code's data. So a code with a logo is drawn a little denser — only as much as its logo needs — and the budget is counted on the code as it is actually drawn, never as a flat percentage.
A logo that uses all of the error correction produces a code that decodes perfectly from a PDF and fails on a slightly creased flyer.
Module shapes
Rounded dots and softened corners are fine. Shapes that fill much less of each module, like stars and triangles, cover about half of it. A phone samples the centre of each module, so these decode cleanly in testing, but they leave much less room for a blurred or angled scan. They are a reasonable choice on a poster and a risky one on a small label, so our designer says so when you pick one.
A checklist before you print
- Size from the distance, then check the module width. Use whichever limit is larger.
- Lay out the code plus a four-module quiet zone. Keep that margin empty.
- Dark modules on a light background, at 3:1 contrast at the very least and preferably 7:1.
- Keep logos moderate, and let the error correction rise to H.
- Test a physical proof, on the real material, under the real light, from the real distance, with more than one phone.
Every design in QRtoMany goes through these checks, in the browser as you edit and again on our server when you export. If something would fail in print, you find out before the print run rather than after.