Technology

QR Code Error Correction Explained

QR Code Error Correction Explained

A QR code can be scratched, smudged, partly covered by a logo or printed on a wall that someone has since scuffed with a trolley, and still scan perfectly. That is not luck. It is a deliberate design feature called error correction, and the amount of it is a setting you choose when you generate the code.

Choosing it well is the difference between a code that survives two years on a shop door and one that stops working after a wet fortnight.

The four levels

  • L (Low) — recovers about 7% of the code
  • M (Medium) — about 15%
  • Q (Quartile) — about 25%
  • H (High) — about 30%

The percentage is the proportion of the code’s data that can be destroyed while still allowing a full, exact recovery. Not a partial read or a best guess: the decoder reconstructs the original data precisely, or it reports failure. There is no halfway state where you get most of a web address.

This works through Reed-Solomon coding, the same family of mathematics that keeps CDs playing through fingerprints and lets spacecraft send usable data across the solar system. The code carries redundant symbols computed from the real data, and the decoder uses them to work out both where the damage is and what was originally there.

What it costs

Redundancy takes space, and in a QR code space means modules. Level H can require roughly double the modules of level L for identical content.

That matters because more modules at a fixed printed size means smaller modules, and smaller modules are harder to read. So the choice is genuinely a trade-off rather than a case of more being better:

  • High correction protects against damage.
  • Low correction protects against small modules.

Pick H for a small printed code with a lot of data and you can end up with something so fine that it fails in ordinary light, having protected it against damage it was never going to suffer.

Which level to actually use

Level M is the right default and it is what most generators pick for you. It absorbs realistic wear without inflating the code much.

Move up to Q or H when the code faces the physical world: outdoors, on packaging that gets handled, on a factory floor, on anything that will be cleaned, or when you are placing a logo over the middle.

Drop to L only when the code lives on a screen, or on a clean printed page that will be scanned once and discarded, and you need the coarsest possible modules. A screen has no dust, no scratches and no ink spread, so the redundancy earns nothing.

The logo overlay trap

Putting a logo in the centre is the most common reason people reach for level H, and it is also where the reasoning most often goes wrong.

The error correction budget is not a logo allowance. It is a total damage allowance, and the logo has to share it with everything else that will ever happen to the code. Cover a full thirty percent with artwork at level H and you have consumed the entire budget before the code leaves the press. One scuff and it is unreadable.

Keep overlays to roughly half the stated capacity: about 15% of the area at level H. That leaves genuine headroom for real world wear.

And keep the logo away from the three large corner squares. Those finder patterns are how the scanner locates and orients the code in the first place, and they sit outside the error correction scheme. Damage there is not recoverable at any level.

A worked comparison

Take a 60 character web address, printed at 3cm square.

At level L it fits in a fairly small version, giving generous modules around a millimetre wide. Easy to print, easy to scan, and it will tolerate very little damage.

At level H the same content needs a noticeably larger grid in the same 3cm, so each module shrinks accordingly. It will survive a coffee ring, but it demands better printing and better light to be read at all.

Neither is correct in the abstract. On a menu that gets wiped down nightly, H. On a clean flyer handed out at a conference, L or M and enjoy the bigger modules.

The shortcut that beats all of this

Shorten the data. It is the only move that improves both sides of the trade-off at once.

Cutting a link from 120 characters to 40 can let you raise error correction and end up with larger modules than you started with. Strip tracking parameters, use a short path on your own domain, and let the destination page handle any campaign detail.

Our URL QR code generator runs in the browser, so you can try a few lengths and see the density change before committing anything to print.

Whatever you choose, test the printed article rather than the file. Error correction is a safety margin, and the only way to know how much of it you have left is to scan the thing that will actually be on the wall.

Join the discussion

Held for review before it appears. Links are not allowed and your email is never published.