Anatomy of a QR code
A QR code is a matrix of modules: three large finder patterns (the corners that let a scanner locate and orient the code), timing patterns alternating along the edges, alignment patterns (size-dependent), format and version information, and the data region — your content plus Reed–Solomon error-correction codewords. Everything is placed with a defined mask pattern to break up large light/dark regions that confuse scanners.
Version = size = capacity
Versions 1–40 run from 21×21 to 177×177 modules. Capacity depends on version, error-correction level, and mode (numeric is densest, then alphanumeric, then byte/kanji): version 1-L holds 17 bytes of byte data; a 25-L holds 1,273; 40-L tops out around 2,953. The encoder picks the smallest version that fits — which is why shorter content scans more reliably.
Error correction: your margin of damage
| Level | Recovery | Cost |
|---|---|---|
| L | ~7% | max data |
| M | ~15% | — |
| Q | ~25% | — |
| H | ~30% | min data |
Level H is why a logo can sit in the middle of a code and it still scans. But error correction is not a license for bad design: it rescues damage, not low contrast.
Scannability rules
- Contrast and polarity: dark modules on light background. Inverted codes fail many scanners.
- Quiet zone: keep a four-module white border; codes printed to the edge get cropped by the camera's framing.
- Size = distance ÷ 10: a code scanned from 1 m needs ≥ 10 cm wide; phone-screen codes can be 2 cm.
- Shorten the URL before encoding: fewer characters = lower version = larger modules = faster scans. A tracking-laden URL can push a code two versions up.
- Test on two phones in bad light before printing 500 flyers.
WiFi and vCard QR codes
WiFi codes embed WIFI:T:WPA;S:network;P:password;; — phones join without typing. vCard codes carry contact records for business cards. Both are static: the data lives in the code itself, so a printed WiFi QR with a rotated password needs reprinting, not editing.
Generate QR codes for URLs, text, WiFi, and vCards with adjustable size and error correction in the QR Code Generator.