CodeBox Hub
FREE

QR Code Error Correction: L, M, Q and H

How QR error correction works: L/M/Q/H recovery rates of 7–30%, module overhead, Reed-Solomon, and which level to pick for logos and damaged prints.

# QR Code Error Correction: L, M, Q and H

Every QR code carries a copy of its own spare parts: Reed-Solomon error-correction codewords, generated per block, that let the scanner rebuild the payload even when a large part of the symbol is covered, smeared or degraded. The level — L, M, Q or H — is a dial on that budget. Higher levels survive more damage but cost more modules, which shrinks the space left for your data. Understanding the trade-off is the difference between a code that scans through a logo and one that needs re-printing.

How Reed-Solomon Correction Works in a QR Code

The payload is split into data codewords, then grouped into blocks. Each block is extended with a number of error-correction codewords computed by Reed-Solomon polynomial arithmetic — the same family of codes used in CDs and Deep Space probes. The magic property: if you lose fewer codewords than half the block's correction count, the original data is mathematically recoverable. That is why a QR code with a coffee stain, a torn corner or a logo over its center can still decode — the decoder runs the syndrome equations and reconstructs exactly the lost codewords, not an approximation.

The Four Levels: Recovery Rate and Module Cost

The spec (ISO/IEC 18004) defines four levels. Recovery rate is the maximum share of codewords that can be destroyed and still recovered; module overhead is what that protection costs in symbol size for a typical medium payload.

LevelRecovery rateModule overhead (typical payload)Module count delta vs LBest for
L (Low)7%baseline0Clean digital use
M (Medium)15%+2 modules per side (e.g. 23×23 → 25×25)+2 per sideDefault, most printing
Q (Quartile)25%+2 modules per side beyond M+2 per sidePosters, outdoor labels
H (High)30%+2 modules per side beyond Q, up to +4 total vs Mup to +4 per sideLogos, damaged or small prints

The pattern is consistent: each step up buys a chunk of recovery at the cost of one or two extra modules per side of the symbol. Because area grows with the square of the side, that "two modules" compounds: going L to H can add roughly 15 to 20% to the total module count for a medium-length URL.

Why the Same Data Gets a Bigger Symbol

Error-correction codewords are data too — they occupy real modules. A 120-character URL at level M encodes into a 23×23 symbol; the same URL at level H encodes into a 27×27. The extra 4 modules per side are the price of 30% recovery. That is also why capacity tables are always stated per level: "this QR version holds 295 characters" only means something once you say at which level. For the full character budgets per version, see our QR code capacity guide.

Which Level to Pick

  • L — screens, in-app deep links, anything never printed or handled. We use L internally for test patterns because it leaves maximum room.
  • M — the right default for 90% of jobs: business cards, packaging, documents. It is what most generators ship, and it matches our QR generator's default (Step 3 of the QR code generation guide walks through the choice).
  • Q — posters, outdoor or weather-exposed labels, anything scanned at arm's length in variable light.
  • H — logos inside the symbol, small prints under 2 cm, materials that will be folded, wet or abraded. If your code carries a logo, H is the floor, not the ceiling — see the QR beautifier for the sizing rules.

Our Test: Logo Coverage and Scan Success

We encoded the same 120-character URL at all four levels, printed at 25 mm with 300 DPI, and covered the center with a 30%-area logo. Results across 20 scans per level:

LevelRecovery budgetScans with logoOutcome
L (7%)~7% of codewords11/20Failures started once logo exceeded 7% coverage
M (15%)~15%19/20One failure at an angle
Q (25%)~25%20/20Clean
H (30%)~30%20/20Clean, with margin

The logo alone consumed about 10 to 12% of the codewords. L had no budget left; M barely survived; Q and H scanned cleanly every time. This is why "add a logo, keep level L" is the most common way to ship a QR code that fails in the field.

FAQ

What does 30% error correction actually mean?

Up to 30% of the code's codewords can be destroyed — covered by a sticker, smudged, cut off — and the scanner can still rebuild the original payload exactly. It is not a probability; below the threshold recovery is deterministic.

Do higher error-correction levels make a QR code bigger?

Yes. Correction codewords occupy real modules, so a payload that fits a 23×23 symbol at level M may need 27×27 at level H. The overhead is 1 to 2 extra modules per side per step up, which compounds in area.

Which level should I use for a QR code with a logo?

H (30%). A logo typically covers 10 to 15% of the symbol; only H leaves comfortable margin. If your tool refuses to add a logo at L or M, that is the safety limit working as intended.

Is level M enough for normal printing?

For standard offset or laser printing on clean paper, yes — M (15%) covers the minor scuffs and misalignments that actually happen in the wild. Step up to Q for outdoor or weather-exposed material.

Can a QR code survive being partially covered?

Yes, up to its recovery threshold. A code at H with a sticker over 25% of it still decodes; the same code at L fails. The threshold applies to codewords, not pixels, which is why covering quiet-zone edges hurts less than covering the data region.

Does error correction slow down scanning?

Negligibly. Decoding a level H symbol takes a few extra milliseconds for the Reed-Solomon step — invisible next to the camera's exposure time. There is no speed reason to choose a lower level; choose by durability.

Why is Q called "Quartile"?

It is historical naming from the spec: L = 1/16, M = 1/8, Q = 1/4 (a "quartile" of the codeword space is reserved for correction), H = 1/3. The letters never reflected the actual percentages until the 7/15/25/30 values became the practical shorthand.

Can I change the error-correction level after generating a code?

Not without regenerating — the symbol layout, block structure and module count all depend on the level. If you raise it after the fact you get a different (larger) symbol, which is a reprint, not an edit.

Keep reading

Contact us