QR Code Error Correction Levels (L, M, Q, H)
How much of a QR code can be obscured or damaged while still being readable. Levels go from L (7% recovery) to H (30% recovery), at the cost of denser code.
Why a QR code can survive a coffee stain
A QR code is not just a grid of black and white squares — a chunk of every code is dedicated redundancy. The spec uses Reed-Solomon error correction, the same family of codes that protect CDs, DVDs, and deep-space radio transmissions. The trick is mathematical: extra symbols are appended such that the decoder can reconstruct the original payload even if a fraction of the symbols are missing or wrong.
When you generate a QR you choose how much redundancy to bake in. More redundancy means more resilience, but it also means the encoder needs more modules (the little squares) to fit the same payload, so the code either grows in version (size) or looks denser at the same physical dimension.
The four levels
L(Low) — up to ~7% of codewords can be recovered.M(Medium) — up to ~15%.Q(Quartile) — up to ~25%.H(High) — up to ~30%.
The percentages refer to codewords (8-bit symbols), not pixels. In practice you can think of them as roughly the share of the code that can be obscured, scratched, or printed badly while still being decoded.
The trade-off
Redundancy is not free. Move from L to H on the same payload and the QR jumps several versions — a level-H code can contain only about half the data of a level-L code at the same module count. That matters when you need to print small, or when the payload is a long URL.
What to pick in practice
- Outdoor signage, billboards, vehicle wraps, food packaging — use
H. They get dirty, sun-bleached, and partially blocked by passers-by. - Clean on-screen display —
Mis plenty. Pixels do not degrade. - Branded QR with a logo placed in the middle — use at least
Q, ideallyH. The logo physically obscures modules; the scanner relies on the error correction to reconstruct what is under it. A common mistake is to drop a big logo onto a level-L code and wonder why half the phones in the room cannot scan it. - Tiny printed code (business card, jewellery tag) —
LorMto keep modules large enough for the camera to resolve.
One subtlety: masking
After the encoder lays out data and error-correction codewords it applies one of eight mask patterns to avoid long runs of the same colour, which would confuse the scanner. The mask is chosen automatically based on a scoring function and stored in the format-information strip. You usually do not need to think about it, but it is why two QR codes with the same payload can look completely different.
Toolkiya's QR generator lets you choose the error-correction level so you can match the deployment environment, and the QR scanner decodes whatever level you point at it.
Related Toolkiya tools
Browse the full glossary
Plain-English explanations for the technical terms behind everyday online tools.
See all entries