QR code error correction levels (L, M, Q, H) explained
QR code error correction levels L, M, Q, and H recover about 7%, 15%, 25%, and 30% of a damaged code. What each costs in size, and which level to choose.
QR codes have four error correction levels: L recovers about 7% of the code, M about 15%, Q about 25%, and H about 30% (Denso Wave). Error correction lets a scanner read a code even when part of it is dirty, torn, or covered by a logo. The trade-off is size: each step up adds more modules, so the same content makes a denser code.
For most codes, M is the right choice. Use Q or H when the code will have a logo or face rough conditions, and L only when you need to fit long content and the code will be shown on a screen.
The four levels
| Level | Recovers about | Best for |
|---|---|---|
| L (Low) | 7% | Long content on screens and clean, flat prints |
| M (Medium) | 15% | Most printed codes: menus, flyers, cards |
| Q (Quartile) | 25% | Codes with a small logo, or outdoor and handled surfaces |
| H (High) | 30% | Codes with a larger logo, or labels that get scuffed |
The percentages are approximate, and they refer to codewords, the 8-bit blocks the data is split into, not simply to area. A scratch that clips a little of many codewords can do more damage than a clean hole of the same size.
How error correction works
When a code is made, the data is split into blocks, and each block gets extra Reed-Solomon codewords calculated from it. The same mathematics protects CDs, DVDs, and data sent from space probes. When a scanner reads a code, it uses those extra codewords to find and rebuild missing or misread ones.
Reed-Solomon has a useful property: it can fix twice as many errors when it knows where they are. If part of a code is clearly missing (an “erasure”), it costs less to rebuild than a module that’s quietly read the wrong way.
The level is stored in the code’s format information, next to the corner squares, so the scanner knows how to decode it. You don’t need to tell your phone which level a code uses. How QR codes work explains where the format information sits.
What each level costs
More error correction means less room for your content in each version, so the same content needs a bigger version, with more and smaller modules. Here’s a 40-character link at each level, using the byte capacity figures from Denso Wave:
| Level | Smallest version that fits 40 bytes | Grid size |
|---|---|---|
| L | Version 3 | 29 × 29 modules |
| M | Version 3 | 29 × 29 modules |
| Q | Version 4 | 33 × 33 modules |
| H | Version 4 | 33 × 33 modules |
The difference grows with longer content. Printed at the same width, a denser code has smaller modules, which are harder to read from a distance. If you raise the level, consider printing the code a little bigger. QR code size for printing has the sizing rule.
Which level should you choose?
Choose M for everyday codes
M balances robustness and density. It handles normal wear, a smudge, or slight glare, and it’s a common default.
Choose Q or H for logos
A logo covers modules, and error correction has to rebuild them. The logo must stay well within the level’s limit, because the code also needs a margin for ordinary scanning errors. A common rule is to keep the logo to well under the recovery percentage: with H, which recovers about 30%, a logo covering 10–15% of the code leaves headroom. How to add a logo without breaking the code covers the details.
Choose H for rough conditions
Labels on equipment, codes on outdoor signs, and stickers that get handled benefit from H. Pair it with a larger print size to keep the modules readable.
Choose L for long content on screens
L packs the most into the smallest grid. It suits a long link or block of text shown on a clean, bright screen, where damage isn’t a concern.
Common questions
Does higher error correction make a code scan faster?
Not usually. A higher level helps when the code is damaged or covered. On a clean code, the extra density can make it slightly harder to read from far away.
Can I tell which level a code uses?
Not by looking at it. Some scanner apps show it, and developer tools can read the format information. The scanner reads it automatically either way.
Is a damaged code with H always readable?
No. Error correction can’t help if a corner square (finder pattern) is destroyed, if the quiet zone is covered, or if the damage exceeds the level’s limit. Can a damaged QR code still be scanned? goes through what can and can’t be recovered.
A note on EveryQR
EveryQR chooses the level automatically (Auto) unless you set one: under Settings › New QR codes, you can pick Auto, L, M, Q, or H. If you add a logo or center text, or the code will face rough conditions, set it to H yourself. Its readability check reads every styled design back before you export it.
Browse all QR code guides.
About the author
I’m Shekhar Roy, a software engineer in New Delhi. I build EveryQR, a QR code scanner and creator for Android, and I write these guides from what I’ve learned making and testing it.