How QR codes work, and which error correction level to choose
A QR code looks like random noise, but every square has a job. Understanding just three ideas (versions, error correction and quiet zone) is enough to make codes that scan on the first try, even printed small or stuck on a bottle.
What is inside a QR code?
The three big squares in the corners tell the scanner where the code is and which way is up. The thin dotted lines between them act as a ruler. Everything else is your data plus spare data for error correction, spread across the grid and scrambled with one of eight “mask” patterns so there are no large blank areas that confuse cameras.
Versions: why longer content makes a denser code
QR codes come in 40 sizes called versions. Version 1 is 21×21 modules (squares) and each step adds 4 modules per side, up to 177×177. The generator picks the smallest version that fits. Here is what it chooses for the short link https://example.com/menu:
| Error correction | Version | Grid |
|---|---|---|
| L | 2 | 25×25 |
| M | 2 | 25×25 |
| Q | 3 | 29×29 |
| H | 3 | 29×29 |
A long tracking link with UTM parameters needs version 6 (41×41) at level M. More modules in the same printed area means smaller squares, which are harder to scan from a distance. Shorter links make friendlier codes.
Error correction: L, M, Q and H
Reed-Solomon codes, the same math used on CDs, add redundant bytes so the scanner can rebuild missing parts:
- L, about 7%: smallest code, for clean screens.
- M, about 15%: the everyday default for print.
- Q, about 25%: outdoors, on packaging, on curved surfaces.
- H, about 30%: when you place a small logo in the middle or expect wear.
Higher is not automatically better: each step makes the grid denser. Pick the lowest level that survives the real conditions.
How big should you print it?
A common rule of thumb is a code width of about one tenth of the scanning distance: around 2 cm (0.8 in) for a business card read up close, 10 cm (4 in) for a poster read from a meter away. Always keep the quiet zone, a blank margin of four modules around the code; the generator adds it for you.
Wi-Fi and contact codes
A Wi-Fi code stores a short text like WIFI:T:WPA;S:CafeGuest;P:coffee2026;;. Phone cameras read it and offer to join the network, no typing needed. A contact code stores a vCard with name, phone and email that the phone can save to its address book.
Static codes never expire
Many “free” generators actually give you a dynamic code that points to their own short link, then disable it after a trial. The codes made here are static: the content is the code. They keep working forever and nobody sees who scanned them. Before you print a thousand flyers, scan a test print with two different phones.
Why a QR code will not scan
- Too little contrast: light gray on white, or a light code on a dark background. Keep it dark on light.
- No quiet zone: text or a frame printed right up to the edge of the code.
- Too small for the distance, or printed on a glossy surface that reflects light.
- A typo in the link: the code scans but opens the wrong page. Always test the final file.