The parts of a QR code
Look closely at a QR code and you'll see it isn't random dots:
- Finder patterns: the three big squares in the corners. They tell the scanner where the code is, how big it is and how it's rotated.
- Alignment patterns: smaller squares (one or more, depending on size) that correct distortion when the code is curved or photographed at an angle.
- Timing patterns: two lines of alternating dots between the corners that set the size of each module.
- Format information: next to the corners, it stores the error correction level and the mask used.
- Data and error correction: all the other modules.
- Quiet zone: the blank margin around it, which separates the code from its surroundings.
Versions: from 21 × 21 to 177 × 177
QR codes come in 40 versions. Version 1 is 21 × 21 modules and each version adds 4 modules per side, up to 177 × 177 for version 40. More data means a higher version and a denser pattern. A short link like QR Boost's fits in a small version, which is why it scans better and from further away.
How the data is stored
- The text is turned into bits using the most efficient mode: numeric, alphanumeric, byte or kanji.
- Error correction codes are added.
- The bits are laid out in a zigzag starting from the bottom-right corner.
- A mask is applied: one of 8 patterns that flips certain modules to avoid overly uniform areas that would confuse scanners. The most balanced one is chosen.
Error correction: the secret of its toughness
QR codes use Reed–Solomon codes, the same ones used in CDs, DVDs and space communications. They store redundant information so missing or wrong data can be rebuilt. There are four levels:
| Level | Recoverable data | When to use it |
|---|---|---|
| L (low) | ~7% | Screens and very clean surfaces |
| M (medium) | ~15% | General use: recommended |
| Q (quartile) | ~25% | Outdoors, labels that get scuffed |
| H (high) | ~30% | When there's a logo in the centre |
More correction means more toughness, but also a denser pattern. That's why QR Boost uses M by default and switches to H automatically when you add a logo: the logo covers part of the code and error correction rebuilds it.
How your phone reads it
- The camera looks for the three squares with their characteristic 1:1:3:1:1 ratio.
- It works out the rotation and perspective and “straightens” the image.
- It reads the format information, removes the mask and extracts the bits.
- It corrects errors with Reed–Solomon and turns the bits into text.
- If it's a link, it offers to open it.
All in a fraction of a second.
Why some QR codes don't scan
- Low contrast or inverted colours (light code on a dark background).
- No margin around it.
- Too small for the scanning distance.
- Too much information, making the pattern very dense.
- Logo too big for the chosen correction level.
- Shiny, curved or reflective surfaces.
The QR Boost editor checks all of this and scans your code before you download it. And if you want your QR code to send people to different places depending on who scans it, see how QR Boost works.
FAQ
Why does a QR code still scan when damaged?
Because it stores redundant information (Reed–Solomon error correction) that can rebuild up to 30% of damaged data.
What are the squares in the corners?
Finder patterns: they tell the scanner where the code is, its size and its orientation.
Can I put a logo on a QR code?
Yes, as long as it doesn't cover more than error correction can recover. Level H gives the most room.