QR code error correction levels: L, M, Q and H
What each level really restores, the capacity it costs, and the cases where H is the wrong answer.
What this covers
- What the four levels recover, counted in codewords rather than in vague percentages
- Byte capacity at each level for six symbol versions, and what that does to printed module size
- The parts of a symbol that carry no error correction at all
- How to pick a level for a screen, a flyer, a receipt or a logo
What it does not
- The Reed–Solomon arithmetic itself, which you never need in order to choose a level
- Micro QR and rMQR, which have their own smaller sets of levels
- Damage prediction: no level is a promise about a specific stain, fold or scratch
What the four levels are
A QR symbol stores your payload as data codewords and then adds a second set of codewords computed from them with a Reed–Solomon code. The level you choose decides how many of that second kind are added. Level L adds enough to restore about 7% of the codewords in the symbol, M about 15%, Q about 25% and H about 30%.
The word to hold on to is codewords. Those percentages are not areas of the printed square and they are not a promise about any particular blemish. A codeword is eight modules' worth of data, and it is either recoverable or it is not, so damage spread thinly across many codewords exhausts the budget faster than one solid blot covering the same total area.
Two kinds of damage also cost different amounts. A module the decoder knows it cannot read — an erasure, such as a hole punched through the label — costs half as much of the budget as a module it reads as the wrong colour and has to find on its own. In real printing you do not get to choose which kind you get, so plan with the pessimistic figure.
What a higher level costs in capacity
Recovery codewords take the place of data codewords. The symbol does not grow to make room for them, so at a fixed version every step up the levels stores less.
| Version | Modules | L | M | Q | H |
|---|---|---|---|---|---|
| 1 | 21 × 21 | 17 | 14 | 11 | 7 |
| 2 | 25 × 25 | 32 | 26 | 20 | 14 |
| 3 | 29 × 29 | 53 | 42 | 32 | 24 |
| 5 | 37 × 37 | 106 | 84 | 60 | 44 |
| 10 | 57 × 57 | 271 | 213 | 151 | 119 |
| 40 | 177 × 177 | 2,953 | 2,331 | 1,663 | 1,273 |
Read the table the other way and it becomes a printing decision. Take a 60-byte payload — a short URL with a path. It fits version 4 at levels L and M, needs version 5 at Q, and needs version 7 at H, because version 6 holds only 58 bytes at that level.
Version 4 is 33 modules across, version 7 is 45. Add the four-module quiet zone on each side and you are printing 41 module widths in one case and 53 in the other. In a 25 mm square that is 0.61 mm per module at level M and 0.47 mm at level H. The level went up; the thing a camera has to resolve got 23% smaller.
When a higher level makes scanning worse
The intuition that more recovery means more robustness holds only while the version stays the same. As soon as the level pushes the symbol up a version or two at a fixed printed size, you have traded a damage budget for smaller modules — and on paper, small modules are what fails first.
- If the payload is short enough that the version does not change, raise the level: it is free.
- If the level pushes the version up, check the module size at final print before accepting the trade.
- Below roughly 0.4 mm per module, ordinary office printing and older phone cameras lose modules faster than any level restores them.
- A centre logo is the case where H genuinely earns its cost, because covering modules is exactly the damage the level exists to absorb.
Even at H, a logo is not free. It consumes the same budget that print defects and handling will also draw on, so keep it under about a fifth of the symbol's area and test the printed result rather than the screen preview. A logo sized to the theoretical maximum leaves nothing for the paper.
There is also a part of the symbol no level protects. The three finder squares, the timing lines and the alignment patterns carry no error correction: they are the geometry the decoder needs before error correction can begin. The format information strip beside the finders has its own separate code and is stored twice, which is generous but not unlimited. The practical consequence is that damage across a corner is far more likely to kill a code than the same damage in the middle.
Choosing a level
| Where the code lives | Level | Reason |
|---|---|---|
| Screen, PDF, email signature | L or M | Nothing will damage it; spend the budget on a smaller, denser symbol |
| Flyer, menu, poster, business card | M | Absorbs ordinary print variation without growing the symbol |
| Receipt, ticket, sticker, anything folded or pocketed | Q | Creases and thermal fading are exactly the damage Q covers |
| Centre logo, outdoor sign, industrial label, curved surface | H | Deliberate obstruction, weather and distortion all draw on the same budget |
The generators on this site set a starting level per payload rather than applying one level to everything: a phone number defaults to Q because it is short enough that Q is free, while a long URL defaults to M because Q would cost it a version. Every tool lets you override the default, and the workspace reports the resulting version and module count as you change it, so the trade is visible while you are making it.