QR Code Error Correction: How L, M, Q and H Actually Work

by KoloQR TeamBasics

The four QR code error correction levels as large letters on rounded tiles - Q, M, L and H - above a rounded label reading "Error Correction".

Error correction is the redundancy built into a QR code that lets a scanner rebuild the data when part of the symbol is damaged or covered. A QR code stores its payload twice over in a sense: once as data, and again as mathematically derived recovery information spread across the symbol. If some of the code is scratched, smudged, folded or hidden behind a logo, the scanner reconstructs the missing pieces from what survives.

Key points

  • Error correction is the redundancy built into a QR code that lets a scanner rebuild the data when part of the symbol is damaged or covered.
  • The four levels defined in ISO/IEC 18004 recover approximately 7% (L), 15% (M), 25% (Q) and 30% (H) of the code's data.
  • Higher error correction reduces data capacity, so the same URL needs a larger symbol version - at a fixed printed width, that means smaller modules and a harder scan.
  • Error correction repairs only the data area. Damage to a finder pattern, the timing patterns or the quiet zone usually makes the code unreadable no matter which level was used.
  • Error correction cannot compensate for low contrast, blur, glare or a code printed too small, because those degrade the entire symbol at once rather than one region of it.

What is QR code error correction?

The mechanism is Reed–Solomon coding, the same family of codes used on CDs and in deep-space transmission. Reed–Solomon coding is the scheme that generates a QR code's error correction codewords and reconstructs missing data from the ones that remain intact. It works on codewords, not on individual squares. A codeword is a group of eight modules that a QR code treats as one unit - either one unit of data or one unit of error correction.

Error correction is chosen once, at generation time, and baked into the symbol. The level is written into the format information next to the finder patterns, so any scanner can read which level was used. A printed QR code's error correction level cannot be changed afterwards; changing it means regenerating and reprinting the code.

What do error correction levels L, M, Q and H mean?

The four QR error correction levels recover approximately 7% (L), 15% (M), 25% (Q) and 30% (H) of the code's codewords. Every QR code uses exactly one of them. Higher levels add more recovery codewords, which leaves fewer codewords for your actual data at any given symbol size.

LevelNominal recoveryBytes at version 1 (21×21)Bytes at version 10 (57×57)Typical use
L (Low)~7%17271Screens, apps, long URLs, clean indoor surfaces
M (Medium)~15%14213The common default; general print work
Q (Quartile)~25%11151Small centre logo, handled or outdoor material
H (High)~30%7119Larger logo, industrial marking, abrasion, weathering
Capacity figures are from the ISO/IEC 18004 character-capacity tables, byte mode.

The percentages describe codewords, not surface area, and they are nominal rather than exact. Version 1 makes the arithmetic visible: the symbol holds 26 codewords in total, and Reed–Solomon can repair up to half of the error correction codewords in a block, minus a small reserve the standard sets aside to reduce the risk of decoding wrong data.

Level (version 1)Data codewordsEC codewordsCodewords repairableShare of the 26 total
L19728%
M1610415%
Q1313623%
H917831%

In larger symbols the data is split into several Reed–Solomon blocks and the codewords are interleaved across the whole symbol, so a single blot is distributed over many blocks and each block repairs its own share. Interleaving is why a coffee ring in one corner is usually survivable and why the nominal percentage is a reasonable guide even though correction happens block by block.

Which error correction level should you use?

Use M for most printed QR codes, Q or H when a logo sits on the code or the surface takes abuse, and L only on screens or where the payload is long and the code must stay coarse. M is the level most generators default to, and for a poster, flyer, menu or business card that will not be scuffed, M is the right answer.

Decision rules:

  • If the code will be displayed on a screen, choose L. Screens have no dirt, no folding and perfect contrast, so recovery capacity is wasted redundancy that only makes the code denser.
  • If the code is printed on paper and will not carry a logo, choose M. M covers normal handling, ink spread and light smudging.
  • If the code carries a centre logo, choose Q as a minimum and H if the logo is large. The logo consumes recovery capacity that would otherwise absorb print and scanning errors.
  • If the code goes outdoors, onto packaging, onto a machine, or anywhere it will be rubbed, folded or weathered, choose H. Abrasion removes modules permanently.
  • If the payload is long and the code must stay physically small, choose L or M and shorten the payload instead. Raising the level on a long URL forces a denser symbol, which is usually the bigger risk.

A worked counter-example is useful here. The Swiss QR-bill, the national payment standard for Switzerland and Liechtenstein, specifies error correction level M, a fixed 46 × 46 mm symbol, a minimum module size of 0.4 mm, and a 7 × 7 mm Swiss cross in the centre of the code. That cross covers about 2.3% of the symbol area. A national banking standard puts a logo on a QR code at level M - because the logo is small and the module size is guaranteed. Level H is not a requirement for a logo; it is compensation for a large one.

How error correction changes the size of a printed QR code

Raising the error correction level makes each module smaller at a fixed printed width, because the same data needs a higher symbol version with more modules per side. This is the trade-off most people miss: the level that protects against damage also increases the density that causes scan failures in the first place.

Take a 44-character URL such as https://koloqr.com/qr-codes-for/coffee-shops, encoded in byte mode and printed at 25 mm wide:

LevelSymbol versionGridModule width at 25 mmMinimum symbol width at 0.4 mm modules
L329 × 290.86 mm11.6 mm
M433 × 330.76 mm13.2 mm
Q433 × 330.76 mm13.2 mm
H537 × 370.68 mm14.8 mm

Two things fall out of that table. First, moving from L to H shrinks each module by about 21% at the same printed size - on absorbent stock, that is the difference between crisp modules and modules that bleed into each other. Second, M and Q produce the identical symbol version for this payload, which means Q is free: the same physical code, the same module size, 25% recovery instead of 15%.

Check that second point every time. Because capacity moves in steps, stepping up one error correction level often costs nothing at all. Generate the code at your chosen level, note the grid size, generate it one level higher, and compare. If the grid is unchanged, take the higher level.

How much of a QR code can a logo cover?

A centre logo covering up to about 20% of a QR code's area is reliably recoverable at level H in most print workflows. The theoretical ceiling at H is close to 30%, but spending the entire recovery budget on the logo leaves nothing for ink spread, glare, a fingerprint or a slightly out-of-focus camera - and those errors are drawn from the same budget.

A practical rule that is easy to check: a circular logo whose diameter is half the width of the QR code covers about 20% of the symbol area. A square logo of side 0.45 × the code width covers about the same. Keep to that and level H leaves roughly a third of its capacity in reserve.

Rules that matter more than the percentage:

  • Keep the logo in the centre. A centred logo spreads its damage evenly across interleaved Reed–Solomon blocks. An off-centre logo of the same size concentrates damage and is more likely to exhaust one block.
  • Never let the logo touch the three finder patterns. Those large squares in the corners are how a scanner locates the code at all, and they carry no error correction.
  • Give the logo a solid background. A logo placed directly over modules with a transparent background creates ambiguous half-modules around its edge, which produces errors the decoder still has to spend capacity fixing.
  • On version 7 and larger symbols, watch the alignment patterns. Versions 7 and above place alignment patterns inside the data area, including near the centre. A large centre logo can bury one, which usually still scans flat-on but can fail at an angle or on a curved surface.
  • Test the printed code, not the screen preview. A logo that works at 400% zoom on a monitor can fail at 25 mm on uncoated paper.

KoloQR, a free QR code generator with circular and custom-shaped QR codes, supports logo placement and lets you set the error correction level before export. Decorative module shapes - rounded dots, circular modules - reduce the printed ink area of each module, so they consume some of the same tolerance the error correction is there to provide. Styling never improves scan performance; error correction is what absorbs the difference. See branded QR codes for what that looks like in practice.

Which parts of a QR code error correction cannot repair

Error correction protects the data area only. The structural patterns a scanner needs before it can decode anything are not covered by Reed–Solomon correction, so damage there is usually fatal regardless of whether the code was generated at L or at H.

  • Finder patterns. The three concentric squares in the top-left, top-right and bottom-left corners tell the scanner where the symbol is and how it is rotated. No redundancy protects them. Covering one typically means the code is never detected.
  • Quiet zone. The quiet zone is the empty margin of four modules around a QR code that lets a scanner detect where the symbol begins and ends. Text, a border or a photograph pushed into that margin breaks detection while every module inside the code is still perfect.
  • Timing patterns. The alternating single-module lines running between the finder patterns set the module grid. Damage here misaligns the entire read.
  • Alignment patterns. Present from version 2 upward, these correct perspective distortion. Losing one is often survivable on a flat, straight-on scan and much less so on a curved bottle or an angled sign.

Format information is the exception. The strip of modules beside the finder patterns that records the error correction level and mask pattern is itself protected by a BCH code and stored twice in the symbol, so it survives a fair amount of damage on its own.

What error correction does not protect against

Error correction fixes localised damage, not global degradation. Raising the level from M to H does nothing for a code that is too small, too pale, blurred or lit badly - those problems affect every module at once, and there is no undamaged region left for the decoder to reconstruct from.

Failures that a higher error correction level will not solve:

  • A code printed too small for its data. Below roughly 0.4 mm per module in print, phone cameras struggle to resolve the grid. Raising the level makes modules smaller and the problem worse.
  • Low contrast. A scanner needs a clear light/dark distinction. A pale grey code on a cream background fails at every level.
  • Inverted colours. Light modules on a dark background are not universally supported; several scanning apps and native cameras expect dark-on-light.
  • Glare and lamination. Gloss lamination under a spotlight reflects into the camera and wipes out the whole symbol.
  • Motion blur and low light. Both degrade the entire image, not one corner of it.
  • A wrong or dead destination URL. Error correction guarantees the scanner reads the encoded string correctly. It says nothing about whether that address still resolves.

When a code fails intermittently in the field and the printed sample looks clean, the cause is nearly always module size, contrast or lighting - not the error correction level.

Error correction on screen versus in print

On a screen, level L is usually the better choice; in print, M is the sensible floor. A QR code on a display faces none of the physical risks error correction exists to handle - no ink spread, no folding, no abrasion, no dirt - so the recovery capacity buys nothing and the extra modules make the code denser than it needs to be.

Screen-specific considerations: a code shown on a phone being scanned by another phone competes with screen glare and brightness, which higher error correction does not address. Increase the displayed size and screen brightness instead.

Print-specific considerations: absorbent stock spreads ink, and each module grows slightly into its neighbours. That dot gain is a real source of errors and it is exactly what levels M and Q absorb. Coated stock spreads less; newsprint, kraft paper and fabric spread more. Export as SVG rather than a scaled-up PNG so the modules stay geometrically exact at the printer's resolution - KoloQR exports both PNG and SVG.

How to test how much damage your QR code actually survives

Test the real printed code rather than trusting the nominal percentage - the level tells you the budget, the print run tells you how much of it was already spent. The procedure below takes about fifteen minutes and gives you a number you can rely on.

  1. Generate the code at final settings. Same payload, same error correction level, same logo, exported as SVG.
  2. Print at production settings on the production stock. Same printer, same paper, same lamination. A laser proof on office paper will not predict how uncoated card behaves.
  3. Scan the undamaged print at the intended distance with two phones. One iOS and one Android, using the native camera. If it fails here, stop and fix the size or contrast before testing damage.
  4. Cover 10% of the symbol area in the centre with opaque tape. For a 25 mm code, a 8 × 8 mm square is close to 10%. Scan again.
  5. Increase the covered area in 5% steps until the code stops scanning. Record the last percentage that worked - that is your real tolerance.
  6. Repeat with the damage placed at one edge and across one corner. Avoiding the finder patterns. Edge damage often fails earlier than centre damage.
  7. Repeat under the actual lighting. The shop floor, the restaurant at night, the warehouse aisle.
  8. Compare the result to the nominal level. If a level H code fails at 12% coverage, the remaining budget was consumed by print quality. Enlarge the code, shorten the URL, or move to a less absorbent surface.

Record the number. It is the single most useful figure to have before committing to a print run.

Common mistakes when choosing an error correction level

The most common error correction mistake is selecting H by default on the assumption that more protection is always safer. On a long URL at a small printed size, H produces a denser code that fails more often than the M version it replaced.

DoWhy
Shorten the URL before raising the levelFewer characters means a lower symbol version, larger modules and more real-world tolerance than any level change delivers
Check whether the next level up changes the grid sizeCapacity moves in steps, so a level increase is frequently free
Use H for outdoor, industrial and packaging codesAbrasion and weathering remove modules permanently, which is exactly what recovery capacity is for
Test the printed sample with damage appliedThe nominal percentage is a ceiling, not a guarantee
Don'tWhy
Use H to compensate for a small codeSmaller modules cause more failures than error correction repairs
Fill the entire recovery budget with a logoPrint, glare and focus errors draw from the same budget and there is nothing left
Assume H protects the finder patternsNo error correction level protects them; a covered finder pattern means no detection
Rely on error correction to survive a missing quiet zoneDetection fails before decoding starts, so recovery capacity is never used
Raise the level after a code fails in the fieldDiagnose contrast, size and lighting first; the level is rarely the cause

Questions? Answered

Use Q as a minimum and H if the logo covers more than about 15% of the code. Keep the logo centred, on a solid background, and within roughly 20% of the symbol area at level H. That leaves recovery capacity for print and camera errors, which draw from the same budget as the logo.

Not always. Higher levels absorb more damage but reduce data capacity, so the same content needs a larger symbol version and smaller modules at the same printed width. For a long URL on a small printed code, level M frequently scans more reliably than level H.

No. The level is encoded in the symbol's format information and determines how the entire code is built, so it cannot be edited afterwards. Regenerate the code with the new level and reprint. If the destination also needs to change, that is a separate problem - static codes point at a fixed URL.

The scanner normally reports a failed read rather than returning wrong data. QR codes reserve a small number of misdecode-protection codewords in the smallest symbol sizes specifically to lower the chance of a corrupted code decoding into a plausible but incorrect value.

No. The three finder patterns, the timing patterns and the quiet zone carry no error correction. A scanner needs them to locate and align the symbol before decoding begins, so covering one usually means the code is never detected - even at level H with an otherwise perfect data area.

The usual cause is module size or contrast, not damage. Level H reduces data capacity, so the symbol grows denser at the same printed width. Measure one module: below roughly 0.4 mm in print, phone cameras struggle regardless of level. Enlarge the code or shorten the URL.

Most generators default to level M, which recovers around 15%. The default is a reasonable compromise for print, but it is worth checking rather than assuming - some tools default to L, and some silently raise the level when you add a logo, which changes the symbol version and the printed density.

Barely. Higher levels add modules, so the camera resolves a slightly denser grid and the decoder runs a slightly longer Reed-Solomon pass, but on modern phone hardware the difference is not perceptible. Scanning speed is determined far more by lighting, focus distance and module size.

No. Error correction codewords are mathematically derived from the payload and hold no independent content. Anything that appears to add a hidden layer - a shape, a colour, an artistic overlay - is decoration that consumes recovery capacity rather than a second channel of data.

Why KoloQR?

  • Create QR codes for websites, menus, Wi-Fi, PDFs, and business cards
  • Customize colors, logos, and unique shapes
  • Download high-quality PNG and SVG files
  • Built for both print and digital
Generate QR Code
A plain black QR code beside the same code restyled as a circle with brand colors