OpenQR

Design

QR code error correction explained

By Sam Moreton · updated 27 June 2026

Every QR code carries a hidden safety margin: spare data that lets a scanner rebuild the message even when part of the code is scratched, smudged or hidden under a logo. That margin is its error correction, and you choose how much of it to build in — one of four levels, from L to H. Pick too little and a coffee ring kills the code; pick too much and you make it needlessly dense. This guide explains how it works, what each level recovers, and exactly when to use which — all accurate to the QR standard, ISO/IEC 18004.

8 min read · Updated 27 June 2026

What is QR code error correction?

Error correction is redundant data baked into a QR code so a scanner can still read it when some of it is unreadable. A QR code isn’t just your link painted as black and white squares — alongside the data, it stores extra recovery information. If a portion of the code is missing, damaged or covered, the scanner uses that recovery data to reconstruct the original message mathematically, with no loss. It’s the reason a QR code on a crumpled receipt or a rain-spotted poster still works first time.

This is defined by the QR standard, ISO/IEC 18004, and it’s built into every QR code ever made — you can’t turn it off. The only choice is how much redundancy to include, expressed as one of four error-correction levels.

The four levels: L, M, Q and H

QR codes offer four error-correction levels. Each recovers a different share of the code if it’s obscured or damaged. More recovery is more robust — but, as we’ll see, it isn’t free.

LevelNameRecovers up toBest for
LLow~7%Clean digital screens, very long data, maximum capacity
MMedium~15%Everyday print on clean surfaces — the common default
QQuartile~25%Packaging, stickers, busier or coloured designs
HHigh~30%Logos, outdoor signage, dirty or scuffed surfaces

The percentages are the proportion of the code’s codewords (its data blocks) that can be lost and still fully recovered. Level H, the highest, can rebuild a code with up to roughly 30% of it missing — which is what makes it the right choice when something is sitting on top of your code.

Why the recovery figures are approximate

Reed–Solomon corrects at the codeword level, and the exact recoverable fraction shifts slightly with the code’s version (size). The ~7/15/25/30% figures are the standard nominal values you’ll see quoted — close enough for every practical decision.

How Reed–Solomon redundancy works (in plain English)

The maths behind QR error correction is Reed–Solomon coding — the same family of algorithms that protects CDs, DVDs and deep-space transmissions from NASA probes. You don’t need the algebra, just the intuition.

Think of it like sending an important message and adding a set of carefully chosen checksums alongside it. Those extra values are calculated from the message so that any small group of them can stand in for missing pieces. If part of the message is lost, the receiver solves a set of equations using the checksums to work out exactly what the missing part must have been. Reed–Solomon is just a very efficient, mathematically guaranteed way of doing this.

  • The encoder splits your data into codewords (8-bit blocks) and computes extra error-correction codewords from them.
  • Both sets are woven into the QR grid — your message and its recovery data, spread across the modules.
  • A scanner reads whatever it can and feeds it to the Reed–Solomon decoder.
  • Lost or wrong codewords are reconstructed from the recovery codewords, as long as the damage stays within the level’s budget.

Reed–Solomon handles two kinds of problem: erasures (modules it knows are unreadable) and errors (modules it misread as the wrong colour). Crucially, the code doesn’t need to know where the damage is — the decoder finds and fixes it. That’s why a logo, a scratch or a glare spot anywhere on the code can all be absorbed by the same redundancy.

The real tradeoff: more correction means a denser code

Higher error correction is not a free upgrade. Those extra recovery codewords are real data that has to live somewhere — so the code needs more modules (the little squares). For the same content, a level-H code is physically denser than a level-L one: more, smaller modules packed into the grid.

Two consequences follow, and they’re the whole reason you choose a level rather than always maxing it out:

  • Capacity drops. At a given code size, level H stores far less than level L. A long URL that fits comfortably at L might force a bigger code at H. Keep your encoded data short (especially the URL) and this matters less.
  • You must print it larger. Denser modules need more physical area to stay crisp and scannable. A high-EC code shrunk onto a business card can have modules too fine for a camera to resolve — so it fails despite all that redundancy.

Higher isn’t automatically safer

It’s tempting to slam everything to level H. But if you then print it small, the gain in redundancy is cancelled out by modules that are too tiny to read. Match the level to the job, and size the printed code to suit. See our print-size guide.

Which level should you choose?

For most everyday codes, the default of M (medium, ~15%) is the right balance — robust enough for clean print, without bloating the code. Step up only when conditions warrant it.

A quick decision guide:

  1. 1

    On-screen or short-lived? → L

    A code shown on a clean digital display, or one carrying a lot of data, can use L to maximise capacity. Screens don’t get scuffed.

  2. 2

    Normal print on a clean surface? → M

    Flyers, slides, menus, a code in a clean document. The standard default and fine for the vast majority of uses.

  3. 3

    Packaging, stickers or coloured design? → Q

    Surfaces that get handled, curved or printed over busy artwork benefit from the extra ~25% headroom.

  4. 4

    A logo, the outdoors, or rough handling? → H

    Anything covering part of the code, or exposed to weather, dirt and scuffing, wants the full ~30% recovery of level H.

Error correction and logos: why a logo needs Q or H

Adding a logo to the centre of a QR code works because of error correction. The logo simply covers some modules; as long as the covered area stays within the level’s recovery budget, the scanner rebuilds the hidden data and reads the code perfectly. This is the single most common reason to raise the level.

A centred logo typically covers 20–30% of the code area — which lines up almost exactly with what level H can recover. That’s why a branded code with a logo should use Q at minimum, and H to be safe. Use M or L behind a logo and you’re likely to obscure more than the code can recover, and it won’t scan.

OpenQR raises it for you

When you add a logo in OpenQR, the code is automatically bumped to level H — the maximum ~30% recovery — so the logo can’t eat past the code’s safety margin. You get a branded code that still scans, without touching a single setting.

Two things still matter even at level H: keep the logo to roughly 20–30% of the code area (bigger isn’t recoverable), and never let it touch the three corner squares — the finder patterns that tell a scanner where the code is. Centre placement keeps clear of them. Our guide to QR codes with a logo covers the full recipe.

Does error correction make a QR code expire or change?

No. Error correction is part of how the code is built — it has nothing to do with whether a code expires. OpenQR makes static codes that encode your link directly, so they work forever regardless of level. Raising the error correction only changes how much damage the code can shrug off, not its lifespan.

Always test the finished code

Whatever level you choose, scan the final design with three to five different phones, in normal and dim light, at the distance people will actually scan from. A code can carry plenty of redundancy and still fail if it’s printed too small or with weak contrast. If a code won’t scan, our guide to why QR codes don’t scan walks through the usual culprits.

Set the level and download free

OpenQR lets you make a code at any error-correction level and export it as PNG, SVG or PDF — at any size, with no watermark and no sign-up. Add a logo and it raises to level H automatically.

Generate a QR code below, customise it, and download it free — add a logo and error correction jumps to level H automatically.

Frequently asked questions

It’s redundant recovery data built into every QR code (defined by ISO/IEC 18004) that lets a scanner rebuild the message even when part of the code is damaged, dirty or covered. You choose how much, via one of four levels: L, M, Q or H.

Related reading