QR code error correction, tested live

Every QR code can repair itself. How much depends on its error correction level. Pick a level, damage the code, and a real QR decoder running in your browser tells you whether it still reads.

Error correction level
Kind of damage
UnreadableThe decoder gave up at 6% cover on level M.

Version 0, 0 × 0. Level M can rebuild up to ~15% of its codewords. Blots that straddle several codewords cost more than their area suggests, so real limits land a little below the headline figure.

What the four levels mean

LevelRecovers up toCapacity (bytes, version 10)Use it for
L~7%271Screens, long data, clean conditions
M~15%213Most printed material (the default)
Q~25%151Outdoor, warehouses, rough surfaces
H~30%119Logos in the centre, high-wear labels

Capacities in byte mode from the ISO/IEC 18004 tables.

How a QR code repairs itself

Your data is split into 8-bit codewords, and a Reed–Solomon code, the same family of maths that protects CDs and deep-space probe signals, adds extra codewords computed from them. Level H adds enough to rebuild roughly 30% of the total. A scanner that finds a mismatch solves for the missing values instead of guessing.

Two details explain the results above. First, the percentage refers to codewords, not area: a blot that clips the edges of several codewords damages all of them, so random blots break codes sooner than one neat square of the same size. That's why a centred logo is the "cheapest" damage. Second, the three finder patterns in the corners aren't protected at all. That's why the simulator never covers them.

Error correction is also why the logo generator forces level H, and it's a reason to leave M alone for everyday print: each step up adds modules, which the size calculator shows as a bigger minimum print size.

Questions people ask

What are the QR code error correction levels?
L recovers about 7% of damaged codewords, M about 15%, Q about 25% and H about 30%. Higher levels make the code denser for the same data.
Which error correction level should I use?
M is the sensible default for print. Use L for very long data on a clean screen, Q for outdoor or industrial use, and H when you place a logo in the middle or the code will get scuffed.
Does higher error correction make a code harder to scan?
It can. More recovery data means more modules, so at the same printed size each module is smaller. If you raise the level, print a little larger.
Why can't I cover the corner squares?
Those finder patterns are how a scanner locates the code and works out its orientation. Error correction repairs data, not the finders. Cover one and the code is usually unreadable at any level.