Skip to content

Error correction

QR codes carry redundant data so a damaged symbol still reads. The amount of redundancy is the error correction level, and there are four of them: L, M, Q and H, recovering roughly 7, 15, 25 and 30 percent of the codewords respectively.

It is the setting people reach for first and understand least, because raising it has a cost that is not obvious until the code is printed.

How the recovery actually works

QR uses Reed-Solomon coding. The data is split into blocks, each with parity codewords appended, and the decoder can reconstruct a block as long as the number of unreadable codewords stays within the budget for that level.

The percentages describe codewords, not area. A smear across a corner, a staple through the middle and a scattering of dust are all different shapes of damage, and what matters is how many codewords each destroys rather than how much of the picture looks wrong.

The cost of a higher level

Redundancy takes space. The same content at level H needs a larger grid than at level L, because the parity data has to fit somewhere. More modules in the same printed area means smaller modules, and smaller modules are harder for a camera to resolve.

So raising the level to make a code more robust can make it less readable: you have traded resistance to damage for a finer grid that is harder to read in the first place. On a clean surface read at a sensible distance, a lower level in a coarser grid often scans better.

When H is the right answer

When something is covering part of the code. A logo in the middle is deliberate damage, and the redundancy is what pays for it — which is why a logo forces the level up and why there is a limit to how large a logo can be.

Also for codes that will be damaged in normal use: labels on equipment, packaging that gets scuffed, anything outdoors for a long time, or a code read through a screen at an angle. For a clean flyer read once, level M is a sensible default and is what this engine picks when you leave it on automatic.

What it cannot save

Error correction recovers scattered damage, not structural damage. Lose a finder pattern and the scanner never locates the symbol; lose the timing pattern and it cannot map the grid; lose the format information and it does not know which level or mask to use.

That is why a code with a worn corner fails completely while one with a scuffed middle still reads. The corners are the parts that cannot be reconstructed, and no level of redundancy changes that.

Common questions

What do the QR error correction levels L, M, Q and H mean?
They are the four redundancy levels, recovering roughly 7, 15, 25 and 30 percent of codewords. Higher levels tolerate more damage but need a larger grid for the same content, so each module is smaller at the same printed size.
Should I always use the highest error correction?
No. Level H makes the grid finer for the same content, so modules shrink and become harder to resolve. On a clean surface at a sensible distance, a lower level in a coarser grid often scans more reliably.
Why does adding a logo change the error correction level?
A logo covers modules, which is deliberate damage, and the redundancy is what allows the code to survive it. That is also why logo size is capped — beyond the recovery budget, the code stops reading.
Can error correction fix a damaged corner?
No. The finder patterns, timing pattern and format information are structural: without them the scanner cannot locate or interpret the grid at all. Redundancy recovers scattered data damage, not the parts that make the code findable.

Related terms

Error Correction (ECC) — QR Code Glossary