Technical7 min read

QR Code Error Correction Explained: L, M, Q, H and Why It Matters

Q

QuicklyGenerateQR

Author

Published

March 11, 2026

Every QR code you've ever scanned has a built-in superpower most users never think about: the ability to recover from damage. You can cover a QR code with a coffee stain, a logo, a scratch, or partial smudging and it still scans. This isn't luck — it's error correction, a feature built into the ISO/IEC 18004 standard that governs every QR code in existence.

This guide explains QR code error correction in plain English. What the four levels mean, how they affect the density of the pattern, when to use each, and why understanding this matters for design choices like logo placement and small-print codes.

30%damage a level-H QR code can sustain and still decode perfectly

What error correction actually does

A QR code encodes data as a grid of black and white squares ("modules"). If some of those modules are damaged — obscured, smudged, printed poorly, or covered by a logo — the scanner needs to reconstruct the missing data. Error correction is the mechanism that makes reconstruction possible.

The technical term is Reed-Solomon error correction, a mathematical scheme invented in 1960 and used in CDs, DVDs, satellite communications, hard drives, and every QR code ever printed. The idea is to store redundant data alongside the actual message, so that even if part of the message is lost, the original can be recovered from the redundancy.

Think of it like sending the same letter in three envelopes through unreliable mail. If one or two envelopes get lost, you still get the letter.

The four levels: L, M, Q, H

The ISO standard defines four error correction levels with increasing redundancy — and therefore increasing recovery capacity:

LevelRecovery capacityData redundancyPattern density
L (Low)~7%LowestSparsest
M (Medium)~15%LowSparse
Q (Quartile)~25%HighDense
H (High)~30%HighestDensest

A Level-L code can recover from about 7% damage. A Level-H code can recover from about 30% damage. The trade-off: higher error correction means more redundant data has to be encoded, which produces a denser, more complex visual pattern for the same payload.

Level L (~7% recovery)

The minimum error correction level. Use only when the code will be printed cleanly on a flat surface that won't get damaged, and the payload is short. In practice, rarely the right default — the 7% recovery margin gives you essentially no room for real-world imperfection.

Level M (~15% recovery)

The default for most QR codes, and the right choice in most situations. Tolerates typical real-world imperfections like smudged ink, minor scratches, or slightly faded printing. This is the safe default for codes without a logo.

Level Q (~25% recovery)

Use for industrial environments with likely minor damage, products labeled on rough surfaces, codes on curved surfaces where distortion is possible, or small codes that need extra safety margin for imperfect camera focus. Overkill for most consumer applications.

Level H (~30% recovery)

Use when embedding a logo in the center, printing on packaging that gets scratched or wet, or deploying outdoors. Automatically applied when you add a logo on QuicklyGenerateQR. You don't need to set it manually — the moment you drop a logo into the generator, the error correction level is bumped to H.

How error correction affects pattern density

Here's the practical consequence: higher error correction means a visually more complex code, because more redundant modules need to be encoded.

For the same payload (say, a 40-character URL):

  • Level L might produce a 21×21 module grid (the smallest possible)
  • Level M might produce a 25×25 grid
  • Level Q might produce a 29×29 grid
  • Level H might produce a 33×33 grid

A Level-H version of the same URL has roughly 2.5 times more modules than a Level-L version. The Level-H code looks busier, denser, more "noisy." This matters for two reasons:

  1. Design aesthetics. A sparse, clean code looks more deliberate than a dense busy one.
  2. Minimum printable size. Denser codes need larger minimum sizes to stay scannable, because each individual module needs to be at least 0.25 mm wide per the ISO 18004 standard.

The practical rule: use the lowest error correction level that meets your reliability needs. Not lower, not higher.

Why Level H is the default for logos

The error correction margin is what makes centered logos work. When you place a logo that occupies 20% of the QR code's area, you're effectively "damaging" 20% of the modules from the scanner's perspective. Level H's 30% recovery capacity means the scanner can still reconstruct the full message — with 10% safety margin to spare.

If you tried the same logo with Level M (15% recovery), you'd be over the threshold by 5% — and even if the code scans on a brand-new iPhone in perfect lighting, it'll fail on older cameras, in dim conditions, or on damaged prints.

Rule of thumb for logos:

Logo size (% of code area)Minimum error correction
0-10%Level M works
10-20%Level Q minimum, Level H recommended
20-25%Level H required
Over 25%Pushing the limits even at Level H — make it smaller

See the logo tutorial for the full practical guide.

Ready to put error correction to work?

Error correction is set automatically based on your design choices. Logo present → level H. No logo → level M. You never need to touch the setting.

When to manually override the default

Most users never need to think about error correction. You might need to override in these specific cases:

Going lower (L instead of M):

  • You have a very long payload (over 300 characters) and the default code is too visually dense. Dropping to L produces a sparser code at the cost of reliability.
  • You're printing on limited real estate and need the minimum possible module count.

Going higher (Q or H instead of M):

  • You're embedding a logo (automatic on QuicklyGenerateQR).
  • You're printing on packaging that might be scratched or creased.
  • You're deploying outdoors exposed to weather, dust, or UV.
  • You're using unusual materials — metal, glass, curved surfaces.

A common misconception

The biggest myth about error correction is that "higher is always better." It's not. A Level-H code printed at the minimum module size is actually less reliable than a Level-M code printed at the same physical size, because the Level-H code has more modules crammed into the same space — and each module is smaller and harder for a scanner to resolve.

Pick the error correction level that matches your expected damage level, then size the code appropriately. Don't use Level H as a substitute for adequate sizing or printing quality.

What QuicklyGenerateQR does automatically

To save you from having to think about any of this:

  • Plain codes (no logo) → Level M by default. Works for virtually all standard use cases.
  • Codes with a logo → Level H automatically. The moment you upload a logo, error correction is bumped without you touching a setting.

You don't need to touch the error correction setting for most codes. It's handled based on whether a logo is present.

The takeaway

Error correction is the invisible feature that makes QR codes durable in the real world. The four levels (L, M, Q, H) trade off pattern density for damage recovery, and the right choice depends on your use case — but for most codes, Level M is correct, and for any code with a logo, Level H is correct. You rarely need to think about this actively on QuicklyGenerateQR because the generator picks the right level for you.

For physical sizing implications, see the QR code size guide. For the logo specifics, see the logo tutorial.

Ready to create a code?

Open the free QR code generator and start. Error correction is handled automatically, so you can focus on the parts that actually matter for your audience.

Tagged

TechnicalQr BasicsDesign

Further Reading

All posts →