A QR code survives 30% damage, works from any angle at any reasonable size, and gets read by the crappiest camera. That robustness isn't luck: it's some of the best engineering of the 90s (Denso Wave, 1994), with deliberate decisions behind every little square. Let's go inside.
Anatomy: every square has a job
A QR isn't a random pixel pattern. Every zone serves a function:
Finder patterns: the three concentric squares in the corners. They're the "look here": readers detect them via exact proportions (1:1:3:1:1) independent of size, and with two of them deduce orientation and perspective. The third corrects distortion — that's how codes read tilted or curved around a can.
Timing patterns: dashed lines between finders. They synchronize the grid: telling the decoder where each module row/column sits even if the code is deformed.
Alignment pattern: the extra small square in large versions. Compensates local curvature and distortion in big codes.
Format information: stripes beside finders encoding error-correction level and applied mask — duplicated because without them you couldn't read anything else.
Data + EC: everything else — payload plus Reed-Solomon redundancy.
Versions: from 21×21 to 177×177
There are 40 versions. v1 measures 21×21 modules; each version adds 4 modules per side (v40 = 177×177). More capacity = more modules = needs larger print for cameras to resolve.
Capacity by version and content:
| Content | V1-L | V10-L | V40-L |
|---|---|---|---|
| Numeric | 41 | 271 | 7089 |
| Alphanumeric | 25 | 167 | 4296 |
| Bytes (URLs) | 17 | 110 | 2953 |
Important practical detail: numeric and alphanumeric modes pack denser. A short URL fits a low version = fat modules = easy reading at distance. Stuff in a kilometer-long URL and you jump versions: density grows and real-world scannability drops. Shortening the URL physically improves the code, it isn't cosmetic.
Reed-Solomon error correction: the 30% trick
Reed-Solomon (same as CDs and DVDs) generates mathematical redundancy over data. The standard offers four levels:
- L: recovers ~7% damage. Maximum capacity.
- M: ~15%. The usual balance.
- Q: ~25%.
- H: ~30%. Minimum capacity, maximum robustness.
"Recover damage" literally means you can cover, tear or lose that percentage of modules and the code still decodes. It's why centered-logo QRs work (the trendy branding): choose level H, sacrifice capacity, gain readable personalization.
Technical nuance almost nobody knows: damage must be distributed — losing one contiguous block larger than that block's recovery capacity kills it regardless of global percentage. Centered logos work because design spreads loss across blocks.
The 8 masks: why your QR looks "noisy"
If data were drawn as-is, giant solid zones would appear (many equal bits in a row), drowning finder patterns and confusing readers. Solution: XOR all data zones with one of 8 predefined masks (checkerboard-like, horizontal stripes patterns...).
The encoder evaluates all 8, scoring each result while penalizing big blotches, 1:1:1:1 patterns and similarity to finders, picking the lowest penalty. The chosen mask travels in format information. That's why two QRs of identical content can look different: different encoder, different winning mask.
What makes a QR scan easily
Applying all the above, practical rules have technical explanations:
- High contrast: readers hunt edges; light-on-dark inverted also works but confuses older apps. Black on white remains king.
- Quiet zone: minimum 4-module white margin around. Without it, finder patterns melt into the background and initial detection fails.
- Short URLs: less data → low version → fat modules → fast long-distance reads.
- Level H only when embedding logos: logo-free, M suffices and gains density.
- Physical size: popular 10:1 rule (scan distance : QR width). A 2 cm code scans comfortably at ~20 cm.
Generate yours tuning all these parameters with our QR code generator, producing print-ready PNG/SVG — for signage always print the SVG.
FAQ
Can they carry viruses? A QR only contains text/URL. Risk is where it leads: phishing behind a shortened link. Check the URL your camera shows before opening; QRs are the attacker's new link shortener.
Do they expire? Static QRs never expire: they're printed text. Dynamic QRs expire whose content is a third-party redirector (and die when the service shuts down).
Why do some QRs have weird shapes and still scan? Styling over structure: rounded modules, dots, sufficient-contrast colors. As long as modules, finders and contrast hold, the standard tolerates plenty of design.
Create your custom QR codes with our online generator, free and right in your browser.