QR Code Basics

QR Code Error Correction Explained (L, M, Q, H)

What the four QR error-correction levels mean, how they let damaged codes still scan, and how to choose the right one for your design.

QR code error correction is the built-in safety net that lets a scratched, smudged, or logo-covered code still scan perfectly — and it comes in four levels, L, M, Q and H, recovering roughly 7%, 15%, 25% and 30% of the code.

It's one of the QR code's most underrated superpowers. A barcode that loses a stripe is dead; a QR code can lose nearly a third of itself and shrug it off. Here's how that works, why logos in the middle of codes don't break them, and how to pick the right level. 🐾

What is QR code error correction?

Error correction means adding redundant data to a message so that if part of it is lost or corrupted, the original can still be rebuilt. QR codes do this using Reed–Solomon coding, a well-established mathematical technique also used in CDs, DVDs, and deep-space communications.

When a code is created, extra error-correction codewords are calculated from your data and woven into the grid alongside it. When a scanner reads a damaged code, it uses those extra codewords to detect where the errors are and mathematically reconstruct the missing pieces. Our friendly walkthrough of Reed–Solomon error correction explains the idea without the algebra.

What are the four error-correction levels?

Every QR code is made with one of four levels. More protection means more redundant data, which means fewer characters fit — a genuine trade-off.

LevelLetterApprox. recoveryTypical use
LowL~7%Clean screens, controlled conditions
MediumM~15%General-purpose printing (a common default)
QuartileQ~25%Industrial, outdoor, or dirty environments
HighH~30%Codes with logos or heavy wear

The percentages describe how many of the code's codewords can be damaged and still recovered. In everyday terms: at level H, you could obscure nearly a third of the code and it would still read.

Why do QR codes with logos still work?

This is the crowd-pleaser. When a designer drops a logo into the middle of a QR code, they're deliberately "damaging" it — covering some data modules. Error correction treats that logo exactly like a coffee stain: as long as the covered area stays under the recoverable threshold, the scanner reconstructs the hidden data and the code reads fine.

A logo in a QR code isn't a special feature — it's error correction being used on purpose. The higher the level, the bigger the logo you can get away with.

That's why branded codes almost always use level Q or H. Push the logo too big, though, and you cross the threshold — then no amount of clever math can save it.

How does error correction trade off with capacity?

There's no free lunch. The space inside a QR code is finite, so every codeword spent on error correction is a codeword not spent on your message. Choosing level H over level L roughly cuts your usable data capacity for a given size.

You have two ways to compensate:

  • Keep the payload short. A shorter link leaves more room for both data and error correction. See how much data a QR code can hold.
  • Step up to a larger version. A bigger grid has more modules to go around — but it also prints larger. Our guide to versions and sizes covers the balance.

Which level should I choose?

It depends on where the code will live:

  1. On a screen or in a PDF, with no logo: level L or M is plenty. Digital displays are clean and undamaged.
  2. Printed on paper, flyers, packaging: level M is a sensible default that survives normal handling.
  3. Outdoors, on equipment, or somewhere it'll get grubby: level Q resists scratches and dirt.
  4. With a logo, or on a label that takes a beating: level H gives the most headroom.

When in doubt, remember that higher isn't automatically better — it makes the code denser, which can actually hurt scanning if the code is printed small. Match the level to the real-world risk, not to a vague sense of "more is safer."

Does error correction detect the errors too?

Yes. Reed–Solomon can do two related jobs: error detection (noticing that something is wrong) and error correction (fixing it). In a QR code, some of the redundancy is used to locate where the damage is and some to repair it. There's also a separate error-detection role for the format information, which is protected even more heavily because losing it would sink the whole code. The anatomy of a QR code shows where that format info sits.

How does the code actually recover from damage?

It helps to picture the data as a set of small chunks called codewords, each eight bits long. When a code is built, extra error-correction codewords are computed from your data codewords and stored alongside them. Reed–Solomon math treats these as points on a curve; as long as enough points survive, the whole curve — and therefore the original data — can be reconstructed.

QR codes add one more trick: interleaving. On larger codes, the data is split into several blocks and their codewords are woven together across the grid. This means a single scratch or smudge damages a little of many blocks rather than destroying one block entirely — spreading the harm thin so each block stays within its recoverable limit. It's why a diagonal scratch across a big code often does surprisingly little damage.

Can error correction be abused?

Not maliciously in itself — but it's worth knowing that a code's robustness has nothing to do with whether the link it contains is trustworthy. A crisp, high-error-correction code can still point to a malicious site. Error correction protects the reading of the code, not the safety of its destination. For that, lean on our QR code safety checklist.

Ready to make one? You can create a free QR code with QR Puppy and pick the error level that suits your use — static, no tracking, no expiry.

Frequently asked questions

Does higher error correction make a QR code more reliable?

Up to a point. It helps codes survive damage and logos, but it also packs in more modules, making the code denser. If that denser code is then printed small, scanning can actually get harder. Choose the level to match the expected wear, not maximum protection by default.

What error-correction level do most QR codes use?

Level M (about 15% recovery) is a common general-purpose default, balancing capacity against robustness. Codes with logos typically jump to Q or H, while purely on-screen codes can safely use L.

How big a logo can I safely add?

As a rough rule, keep the logo within the recoverable area — smaller than the error level allows. With level H (~30%), a logo covering up to roughly a fifth of the code is often safe, but always test-scan before printing.

What technology does QR error correction use?

Reed–Solomon coding, the same family of error-correcting codes used in CDs, DVDs, QR's cousins, and spacecraft communication. It adds redundant codewords that let the original data be reconstructed from a partly damaged code.

If I cover a finder pattern, will error correction save the code?

No. Error correction protects the data region, not the finder patterns. If a scanner can't detect the three corner finders, it can't even locate the code — so never place a logo or damage over them.

Make a QR code the honest way 🐾

Free forever, no tracking, no expiry — generated right in your browser.

🎨 Create a QR code →