Reference · 11 min read
How big does a QR code need to be to scan?
The real answer is module width, not code width: where the distance-divided-by-ten rule comes from, when it breaks, and minimum print sizes in millimetres.
Someone has asked how big the QR code should be on the flyer, and every answer online is either “at least 2 by 2 cm” or “it depends”. The first is a number with no reasoning behind it, so it fails the moment your code holds more than a short link. The second is true and unhelpful.
There is a proper answer, and it is arithmetic rather than taste. The only measurement that decides whether a code scans is the width of one module — one of the little squares. Everything else is derived from it.
Start with the module, not the code
A QR code is a grid. The smallest grid is 21 × 21 modules, and each step up in version adds four modules per side: 21, 25, 29, 33, and so on to 177. More data means a higher version means more modules in the same physical square, which means each module is smaller.
A camera decodes by resolving individual modules. Below roughly two camera pixels per module it cannot tell them apart at all, and below about three it starts guessing. That is where the real limit lives:
Maximum reliable scan distance is about 250 times the module width. A 1 mm module reads at about 250 mm. A 0.5 mm module reads at about 125 mm.
The famous rule of thumb — code width equals scanning distance divided by 10 — is that same rule with an assumption hidden inside it. Dividing by 10 assumes a code about 25 modules across, because 25 modules at 1 mm is 25 mm wide and 25 mm × 10 is 250 mm. It is right for a short URL and wrong for anything dense: a 57-module code at 25 mm has 0.44 mm modules and dies at about 110 mm.
So use distance ÷ 10 as a sketch, then check the module size, and scale the width up by module count ÷ 25 for a denser code.
The quiet zone is part of the code
The specification requires four modules of blank space on all four sides. It is not padding and it is not the designer’s margin to reclaim. The decoder uses that border to find the code’s edges at all, which is why a cropped code often fails completely rather than failing a bit.
For a 25-module code with 1 mm modules that is 4 mm on each side, so a 25 mm code has a 33 mm footprint. Budget for it from the start.
Three ways people lose the quiet zone without noticing:
- Cropping the exported PNG to “remove the white space”.
- Placing the code on a coloured or patterned background. The quiet zone has to be the same light tone as the light modules. A code sitting directly on a photograph has no quiet zone.
- Butting it against a fold, a trim edge or a border rule. Four modules of blank, then the line.
Minimum sizes by where the thing will be
These assume a short URL — about 30 characters, which lands on a 25 to 29 module code — at error correction M. The widths are the code itself; add the quiet zone on top.
| Where it lives | Read from | Minimum width | Use |
|---|---|---|---|
| Business card, product label | 150 mm | 15 mm | 20 mm |
| A5 flyer, leaflet, packaging panel | 300 mm | 30 mm | 25–30 mm |
| Restaurant table card, menu | 400 mm | 40 mm | 35 mm |
| A4 sheet or notice at eye level | 600 mm | 60 mm | 40–50 mm |
| A2 / A1 poster | 1.5 m | 150 mm | 150 mm |
| Shop window, read from the pavement | 2.5 m | 250 mm | 250–300 mm |
| Exhibition banner | 3 m | 300 mm | 300 mm |
| Parked vehicle, van livery | 4 m | 400 mm | 400–500 mm |
| Billboard | 25 m | 2.5 m | 2.5–3 m |
Two notes. 20 mm is a practical floor whatever the arithmetic says: below it, print tolerance and a shaky hand matter more than optics. And a moving vehicle is not a scanning target — nobody photographs a code on a van doing 50. Size vehicle codes for the car park.
Shortening the URL is a size decision
The length of what you encode sets the physical size you need. Capacity at error correction M, for ordinary mixed-case text:
| Version | Modules | Characters | Width at 0.5 mm module |
|---|---|---|---|
| 1 | 21 | 14 | 10.5 mm |
| 2 | 25 | 26 | 12.5 mm |
| 3 | 29 | 42 | 14.5 mm |
| 4 | 33 | 62 | 16.5 mm |
| 6 | 41 | 106 | 20.5 mm |
| 10 | 57 | 213 | 28.5 mm |
Going from a 26-character link to a 213-character one — which is what pasting a URL full of campaign parameters does — more than doubles the width for the same reliability, and the area grows fivefold. Strip the tracking parameters and the code shrinks for free.
One free trick: an all-uppercase URL encodes in alphanumeric mode rather than byte mode and fits roughly 45% more characters per version. Domain names are case-insensitive so HTTPS://EXAMPLE.COM is safe. Paths and query strings usually are not, so only do this if you control the server and have checked.
Error correction: M is the answer almost always
The four levels recover roughly 7%, 15%, 25% and 30% of damaged codewords. More recovery means more codewords means a denser code. For a 60-character URL:
| Level | Recovery | Version | Modules |
|---|---|---|---|
| L | ~7% | 4 | 33 |
| M | ~15% | 4 | 33 |
| Q | ~25% | 5 | 37 |
| H | ~30% | 7 | 45 |
At this length M is free: it lands on the same version as L, so there is no reason to choose L. H costs 36% more width, which at a fixed size means modules 27% smaller and the scan distance cut by as much.
That matters for logos. People reach for H to punch a logo through the middle, but raising the level shrinks every module, and you often lose more distance than the logo cost you. A logo under 15% of the area at M is usually a better code than one at 25% with H. And “30% recovery” is not a licence to obscure 30% of the picture: the three finder patterns, the timing lines and the format information cannot be damaged at all.
Genuine reasons for Q or H: direct printing on corrugated board, textile labels, laser-marked metal, anything that will be scuffed, and codes that will sit outdoors.
Print reality
Contrast, and why inverted codes are a gamble
Black on white, unless you have a reason. If you must use colour, keep the dark modules genuinely dark — under about 30% lightness — and the light areas above about 85%. Convert your proposed pair to greyscale and look at it; if the difference is unconvincing in grey, a camera in a badly lit pub will not rescue it.
Light modules on a dark background work in most modern decoders, but not all, and not reliably in poor light. For anything printed in quantity, do not invert. If a designer insists, test on an iPhone camera, Google Lens and one phone at least four years old before it goes to press.
Dark packaging, gloss and curves
- Dark material. Do not print a light code onto black card. Print a light panel and put a dark code on it. The panel is your quiet zone as well.
- Glossy laminate and spot varnish. Specular reflection under a shop light blows out half the code and the scan never happens. Ask the printer for a matte patch over the code area, even on a gloss job.
- Bottles and curved surfaces. Modules compress towards the edges as the surface turns away. Keep the width under about a quarter of the circumference — roughly 50 mm on a 65 mm bottle — and never cross a label seam, a moulding line or a fold.
- Absorbent stock. Uncoated paper, corrugated and fabric all spread ink. Add 30 to 50% to your module size, and on direct-printed corrugated treat 0.8 mm as the floor.
Screens are a different problem
A code shown on a phone for someone else to scan should be at least 200 CSS pixels wide with the screen brightness up. Render it at the device pixel ratio or use SVG; a 200-pixel PNG stretched to 200 points is already blurred before the second camera sees it. Tilt the screen a few degrees to kill the reflection of the room.
The failure that accounts for most of them
Almost every dead printed QR code died the same way: someone dropped a PNG into a layout program and dragged the corner until it fitted the space. Nothing in the layout warns you that the modules have just gone below what the press can hold, and the image still looks perfect on screen at 400% zoom. The arithmetic is simple and nobody does it:
module width = code width ÷ module count. A 57-module code placed at 18 mm has 0.32 mm modules. On a 300 dpi press that is under four dots, ink spread closes the gaps between them, and the code is scrap.
Three habits that prevent it:
- Place vector, not raster. SVG, PDF or EPS keeps the module edges as hard vector edges at any size. A raster code resampled to a non-integer pixels-per-module ratio gets a soft grey fringe on every edge, and the RIP softens it again.
- Never re-save a code as JPEG. The compression rings around every hard edge, which is exactly what a QR code is made of.
- Keep the module at 0.4 mm or more for offset and digital print, 0.6 mm for uncoated or flexo, 0.8 mm for corrugated. Below 0.4 mm you are relying on the printer having a good day.
This is the practical reason to export at the size you will actually print. QR Studio writes SVG, PDF and EPS at an exact specified width, warns when the resulting module size is too small for print, and shows you the decoded payload so you can see how much data you are asking the code to carry before you commit to a size.
Verify on the real thing
A code that scans from the screen of the machine that made it has proved nothing. Print a proof at 100% — not fit-to-page, which silently shrinks everything by a few percent — tape it where it will live, stand where the reader will stand, and scan it with two phones, one of them old, under the lighting the place actually has. That takes four minutes and it is the only test that counts.
The short version
- Module width, not code width, decides whether it scans. Reliable distance is roughly 250 × module width.
- Distance ÷ 10 is a fine sketch at 25 modules; scale up by module count ÷ 25 for denser codes.
- Four modules of blank on all four sides, in the same light tone. Always.
- 20 mm is the practical floor; 0.4 mm is the module floor for good print.
- Shorten the URL — it is the cheapest way to make the code smaller.
- Error correction M unless the surface is rough or outdoors, and a small logo at M beats a big one at H.
- Place SVG or PDF at an exact width; never scale a raster code to fit.
- Proof at 100%, at the real distance, on two phones.
