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

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

QR codes come in four error correction levels. Level L restores about 7% of the code, M about 15%, Q about 25% and H about 30%, so a code can be scratched, smudged or partly covered and still read. M is the sensible default and what most generators use. Choose H when you’re putting a logo in the middle or printing something that will get handled, and accept that the code gets denser in return.

Denso Wave, which developed the format, describes the trade-off plainly: level Q or H for environments where codes get dirty, level L for clean ones, with M the commonly used middle.

The four levels at a glance #

LevelRestores aboutBest forCost
L7%Big clean codes on screens, or dense content where size is tightLeast resilient to any damage
M15%Menus, posters, table cards, business cards. The usual defaultBalanced
Q25%Labels on equipment, outdoor signage, small stickersDenser code
H30%Codes with a logo, industrial or outdoor use, anything that gets scuffedDensest code for the same content

The percentages refer to the code’s data blocks rather than to physical area, so treat them as a design budget, not a promise that exactly 30% of a printed square can be destroyed.

How error correction actually works #

When a code is generated, the text is split into data codewords and the encoder calculates extra Reed-Solomon codewords from them. Both go into the grid, and the error correction codewords are spread around the symbol rather than parked in one corner.

Two things follow from that:

  • A scanner can rebuild what it can’t see. If a block of squares is unreadable, the recovery data reconstructs those codewords. The scan either succeeds completely or fails completely; you never get a half-decoded address.
  • Damage spread thin is survivable; damage concentrated is worse. Because the data is interleaved, a coffee ring across the middle affects many blocks a little. That’s the case error correction handles best.

This is also why a QR code can carry a logo at all. From the scanner’s point of view a logo is damage, and the recovery data fills in what it hides.

Which level should you choose? #

  • On a screen, or a clean printed page people scan from inches away: M. There’s nothing to damage, and a lighter level keeps the code simple.
  • A restaurant table card, flyer or poster: M. Grease, fingerprints and a crease or two fall well inside its budget.
  • A business card: M, or Q if the card is coated and will live in a wallet. See business card QR codes.
  • Anything with a logo in the middle: H. Don’t try to save size here.
  • Outdoors, on packaging, on tools, or on labels that get rubbed: Q or H, which is exactly the case Denso Wave points at.
  • A large code on a dark-on-light background with lots of content and limited space: L, but only if it’s protected and scanned in good conditions.

If you’re unsure, M is right far more often than not.

What a higher level costs you #

Error correction data takes space in the grid that your content would otherwise use. Push a code from L to H and you lose more than half the capacity at the same size, so the generator jumps to a bigger version to fit your text. At a fixed printed width, a bigger version means smaller squares.

That’s the uncomfortable part: raising the level to survive damage can make the code harder to scan in the first place, because the squares shrink. Denso Wave notes the same thing, that a higher correction level improves resilience but increases the code’s size.

The way out is usually less content, not a lower level. A shorter link buys back everything that level H costs. How much data a QR code can hold goes through the length side of that equation.

What error correction can’t fix #

Error correction protects the data area. It does nothing for the parts a scanner needs before it can read any data:

  • The three corner finder patterns. Cover one and the scanner never locates the code. This is the single most common way a logo breaks a code.
  • The blank margin. QR codes need a quiet zone four modules wide on every side. Cropping a code tight against a border or a photo can make it unreadable no matter which level you picked.
  • Contrast. A pale code, an inverted light-on-dark code or a busy background defeats the camera before error correction is involved.
  • Blur, glare and distance. If the squares aren’t resolved, there’s nothing to correct.
  • Damage past the budget. A code missing a third of its area at level M is gone.

QR code not scanning works through all of these in order.

How to set the error correction level #

Most web generators expose the level as a dropdown, and most set it to H automatically when you upload a logo. Some free tools don’t show it at all, in which case you’re almost certainly getting M.

QR Handler makes the choice for you: codes generate at level M, and adding a logo switches the code to level H so the covered area is recoverable. Tap Remove logo and it drops back to M, keeping the code simpler. Everything is generated on the phone, so the code is static and the content stays in the pattern rather than routing through a service. Adding a logo to a QR code covers how far you can push the logo size.

You can’t tell a code’s level by looking at it. It’s recorded in the format information beside the top-left finder pattern, so a decoder can report it, although phone scanners generally don’t show it. You also can’t change the level of a code that already exists: the recovery data is baked into the pattern, so you generate a new one.

Frequently asked questions #

What is the best error correction level for a QR code? #

Level M for most printed and on-screen uses, and level H when the code carries a logo or will be scuffed, wet or dirty. Level Q is a reasonable middle for outdoor labels. Level L is only worth it when the code is large, clean and holding a lot of data.

How much of a QR code can be damaged and still work? #

Up to about 30% at level H, and about 15% at the common level M. That budget covers the data area only. Damage to the three corner squares or to the blank margin around the code usually stops the scan regardless of the level.

Does higher error correction make a QR code bigger? #

Yes. The recovery data takes space, so the same content at level H needs a larger grid than at level M. Printed at the same width, that means smaller squares, which is why level H is a choice to make deliberately rather than by default.

Can I change the error correction level of a code I already made? #

No. The level is fixed when the code is generated. Make a new code at the level you want, and replace the printed one.

Does error correction protect against someone tampering with a QR code? #

No. It repairs accidental damage, not deliberate substitution. A scammer’s sticker placed over a real code is a perfectly valid code in its own right, and every scanner will read it happily. That risk is handled by looking at the code and at the address it decodes to, as in spotting a fake parking meter QR code.