How a QR code holds data
A QR code is a grid of black and white modules. The specification defines versions 1 to 40, from 21×21 to 177×177 modules. Higher versions hold more data, but each module becomes smaller for the same printed area — which is exactly what makes dense codes hard to scan.
Error correction levels
Part of every code is redundant data, so a damaged code can still be read. Four levels trade capacity for resilience:
- L (Low) — recovers about 7% of damaged modules, maximum capacity
- M (Medium) — about 15%, the usual default
- Q (Quartile) — about 25%
- H (High) — about 30%, for printing on curved or dirty surfaces
Higher correction means a larger, denser code for the same content. For a clean screen or a crisp label, M is usually the best balance; use Q or H when the code will be printed small, on packaging, or exposed to wear.
Why shorter content scans better
Capacity is consumed by every character. A long URL forces a higher version, shrinking each module. The practical fix is to shorten the URL before generating the code: fewer characters, fewer modules, larger modules, faster and more reliable scanning.
How large to print
The common rule is that the scanning distance should be roughly ten times the code’s width. A code on a poster read from 3 m away should be about 30 cm wide. For phone scanning at arm’s length, 2–3 cm is a safe minimum.
Do not forget the quiet zone
Every QR code needs a blank margin of at least four modules around it. Placing a code flush against dark artwork or cropping the margin is one of the most frequent reasons a well-sized code still fails to scan.
Dynamic vs static codes
A static code encodes the destination directly: it never expires but cannot be changed. A dynamic code encodes a short redirect URL, so the destination can be edited later — at the cost of depending on the redirect service staying online. For permanent content, static is more robust.