ShibaQR

QR Code Error Correction: When L, M, Q and H Actually Matter

What the four error-correction levels do, why a higher level can make a small code harder to scan, and which one to pick for logos, labels and outdoor signs.

4 min read

Every QR code carries redundant data so it still reads when part of it is dirty, torn or covered. How much redundancy is the error-correction level, and generators let you pick one of four.

Level Recoverable Typical use
L ~7% Clean surfaces, screens, very long payloads
M ~15% The sensible default for print
Q ~25% Labels, packaging, anything handled
H ~30% Codes with a logo, outdoor or industrial use

The trade-off nobody mentions

Redundancy is not free. The recovery data is stored as extra codewords inside the same code, so raising the level either pushes the code to a larger version, or leaves less room for your actual content.

Concretely: the same 100-character URL at level L fits in a 29 × 29 grid. At level H it needs 57 × 57. If you print both at 3 cm wide, the L code has 1.03 mm modules and the H code has 0.53 mm modules — half the size, on the same piece of paper.

That is the part that catches people out. At a fixed physical size, higher error correction means smaller modules — and smaller modules are harder for a camera to resolve. Pushing a business-card code from M to H to "make it more reliable" can make it less reliable.

Higher error correction helps when the damage is localised: a coffee stain, a scratch, a staple, a logo. It does not help with problems that affect the whole image — blur, low contrast, poor focus, bad lighting. For those, a bigger code with bigger modules is the answer.

Picking a level

Use L when the surface is pristine and the payload is long: a code on a web page, in a slide deck, inside an app. Nothing will damage it, and you want to keep the grid as coarse as possible.

Use M for almost all print. It absorbs ordinary wear — a fingerprint, a crease — without inflating the grid much. If you are unsure, this is the answer.

Use Q for anything that gets handled or lives in the weather: product labels, shipping boxes, parking signs, equipment tags. Expect scuffs and plan for them.

Use H when you are deliberately covering part of the code — which in practice means a logo in the middle.

Logos: how much can you actually cover?

Level H recovers around 30% of codewords, so in theory a logo could cover 30% of the area. In practice, aim for no more than 15–20%, centred, and test it.

Two reasons. First, the 30% figure is about codewords, not pixels; a logo sitting across a block boundary damages more codewords than its area suggests. Second, the three large finder squares in the corners and the timing patterns between them are not protected by error correction at all. Cover any part of them and the code is dead, however high the level.

Practical rules that work:

  • Keep the logo square or circular and centred. An off-centre logo is more likely to clip a timing pattern.
  • Give it a solid background in the same colour as the code's light modules — usually white — rather than letting it sit transparent over the pattern.
  • If your logo is wide, put it beside the code rather than on it. A code with a wordmark underneath always scans; a code with a wordmark across the middle often does not.

When H is doing real work

A restaurant table tent that gets wiped down twice a day. A sticker on a delivery crate. A sign bolted to a fence that spends a winter in the rain. These are codes that will be physically damaged, and 30% recovery is the difference between a code that keeps working for a year and one that stops in a month.

Give those codes level H and make them large enough that the extra modules do not shrink below 0.4 mm. Error correction and physical size are the same decision, made twice.

Tools used in this guide

Read next

All guides →