The four levels
Every QR code is built at one of four error correction levels. A higher level adds more Reed–Solomon error correction codewords, so more of the code can be dirty, scratched or covered and still decode.
The percentages are approximate recovery rates for codewords, not for the visible area. A small patch of damage can touch several codewords, and damage to the finder patterns or format information can stop a scan regardless of the level.
- L (Low): about 7% of codewords recoverable
- M (Medium): about 15%
- Q (Quartile): about 25%
- H (High): about 30%
The trade-off with size
More error correction means less room for data. The same content at level H needs a larger version, with more and smaller modules, than it would at level L.
For example, a version 1 code holds 17 bytes at level L but only 7 bytes at level H. At version 40 the figures are 2,953 bytes at L and 1,273 bytes at H.
Choosing a level
Level M is a common default and suits most printed materials in clean conditions. Level L keeps screen-only or very clean codes as small as possible.
Levels Q and H suit codes that will be worn, printed on rough surfaces, or partly covered by a logo. A logo placed over the modules uses up some of the error correction budget, so the code has less left for real-world damage.