How QR codes work

QR code error correction levels (L, M, Q, H), explained

Higher is not better. Error correction is a budget, and spending it costs you module size.

By Kiril Urbonas5 min read

QR codes carry redundant data so a damaged or obscured symbol still decodes. ISO/IEC 18004 defines four levels — L, M, Q and H — recovering roughly 7%, 15%, 25% and 30% of codewords. Medium is the sensible default. Higher levels add data, which makes the grid denser and every module smaller at the same printed size.

Key takeaways

  • The four levels recover approximately 7% (L), 15% (M), 25% (Q) and 30% (H) of codewords, per ISO/IEC 18004 Table 8.
  • Those percentages count codewords, not picture area — a logo covering 30% of the area at level H is over budget, not at it.
  • A single flipped module corrupts a whole codeword, and a misread codeword costs two correction codewords to repair rather than one.
  • Raising the level adds redundant data, which grows the grid and shrinks every module at the same print size. Higher correction can make a small code scan worse.
  • Use M for most print work, Q or H only when something will genuinely obscure part of the code.

What does error correction actually do?

It lets a damaged code still decode. When a QR code is generated, the encoder adds redundant data alongside your content using Reed–Solomon coding — the same family of mathematics used on CDs and in deep-space telemetry. If part of the symbol is scratched, smudged, covered or misprinted, the scanner reconstructs the missing data from the redundancy.

That redundancy is why a QR code can carry a logo in the middle, survive a coffee ring, and still work on a label that has been outdoors for two winters.

It is also why the level you choose is a real engineering decision rather than a “higher is safer” slider — which is what most of this page is about.

The four levels, and what the percentages mean

ISO/IEC 18004 defines four levels. The level is encoded into the symbol itself, in the format information beside the finder patterns, so a scanner knows which level to decode against before it reads any data.

LevelRecovery capacityUse when
L — Low~7% of codewordsClean digital display, space is tight, nothing will obscure it
M — Medium~15% of codewordsThe sensible default for most print work
Q — Quartile~25% of codewordsIndustrial labels, dirty environments, a small logo
H — High~30% of codewordsA centre logo, or outdoor signage that will weather
Error correction levels per ISO/IEC 18004 Table 8

7 / 15 / 25 / 30%

Recovery capacity for levels L, M, Q and H. ISO/IEC 18004 Table 8 states these as approximate percentages of total codewords — Denso Wave footnotes the same figures as a “data restoration rate for total codewords”.

Source: ISO/IEC 18004:2015 Table 8; Denso Wave, Error correction feature

Why codewords, not area, is the catch

The percentages count codewords, not picture area — and the difference matters the moment you put something on top of a code.

A codeword is a block of eight modules’ worth of data. The symbol is a sequence of them, and error correction can repair a certain number per symbol. Two consequences follow:

  • One flipped module corrupts a whole codeword. A single module read as light when it should be dark does not cost you one module of budget; it costs the entire codeword that module belonged to.
  • A misread costs double. The standard is explicit that an error whose location the decoder does not know — a substitution rather than a known erasure — requires two error correction codewords to correct, not one.

What higher correction costs you

Redundant data is still data. It occupies the grid, so raising the level grows the symbol — and at a fixed printed size, a bigger grid means smaller modules.

That is the trap: higher error correction can make a small code scan worse. You have bought the ability to recover from damage that is not occurring, and paid for it in module size, which is the variable that actually decides whether a camera can read the code at all.

Level for a 100-character URLGridModule size at 3 cm
L — Low37 × 370.81 mm
M — Medium41 × 410.73 mm
Q — Quartile45 × 450.67 mm
H — High53 × 530.57 mm
The same content and the same printed size, at each level

Across the whole range that is a 30% reduction in module width for redundancy you may never use. On a 3 cm business card code it is survivable; on a 2 cm label it is the difference between working and not. The sizing guide covers where those thresholds sit.

Which level should you choose?

Match the level to the damage you actually expect:

  • M for most print work. Posters, flyers, menus, business cards, packaging. It is the default for a reason.
  • H when a logo sits on the code. You are deliberately destroying part of the symbol, so you need the budget. Print the code larger to compensate for the denser grid.
  • Q or H outdoors and in industrial settings. Sun fade, dirt, scuffing and partial occlusion are real there, and the code is usually large enough to absorb the extra density.
  • L only on a clean screen where you control the rendering and space is genuinely tight.

One rule overrides all of the above: if raising the level pushes your modules below about 0.4 mm at the printed size, you have made the code worse. Enlarge the print or shorten the content instead.

Next: adding a logo without breaking the scan, which is where this budget actually gets spent, and the print guide for everything else that decides whether a code survives contact with paper.

Frequently asked

Which error correction level should I use?
M (medium) for most print work. Move to Q or H only when something will genuinely obscure part of the code — a centre logo, an industrial label that will get dirty, outdoor signage that will weather. Use L only on a clean screen where space is tight.
Does higher error correction make a QR code more reliable?
Not automatically. It adds redundant data, which grows the grid, which shrinks every module at the same printed size. On a small code, moving from M to H can make scanning worse rather than better, because smaller modules are harder for a camera to resolve than the extra redundancy is worth.
Can a QR code with 30% of it covered still scan?
Often, but not dependably, and the 30% figure is not a promise about area. ISO/IEC 18004 states recovery capacity in codewords, and because a corrupted codeword costs two correction codewords to repair, physical coverage consumes the budget faster than the headline percentage suggests. Test the actual artwork.
What does the L, M, Q, H actually stand for?
Low, Medium, Quartile and High — the four error correction levels defined by ISO/IEC 18004. They are encoded in the format information near the finder patterns, so a scanner knows which level to decode against before it reads the data.
Try it

Switch error correction in the generator and watch the grid density change in the live preview — the trade-off becomes obvious immediately.

Try the levels side by side

Written by

Kiril Urbonas — builder of QRify, a free QR generator that runs entirely in your browser. Corrections and additions are welcome; this page is updated when the guidance changes.

Read next