QR code error correction levels, explained

What the L, M, Q and H error correction levels actually protect against, how much data each leaves room for, and which one to choose for print, packaging and logos.

What error correction does

Every QR code carries extra data that lets a scanner rebuild the message even when part of the symbol is unreadable — scratched, smudged, faded, folded, partly covered, or caught in glare. That extra data uses Reed–Solomon codes, the same family of error-correcting codes used on CDs, DVDs and in deep-space communication.

When you make a QR code, you choose how much of the symbol to devote to that redundancy. There are four levels:

Level Recovers up to In plain terms
L (Low) ~7% of the data Clean, controlled environments
M (Medium) ~15% The sensible default
Q (Quartile) ~25% Codes that will get worn or dirty
H (High) ~30% Harsh conditions, or a logo over the centre

The percentages refer to codewords — the 8-bit blocks the data is split into — not to a neat fraction of the printed area. Damage concentrated in one place is handled very differently from damage spread across the code, and damage to the structural patterns described below is not recoverable at any level.

The trade-off: protection costs capacity

Redundancy takes space. At any given size, a higher level leaves less room for your data, so the same content produces a denser code.

These figures come straight from the encoder: the maximum number of bytes (for example, URL characters) each version holds at each level.

Version Grid L M Q H
1 21 × 21 17 14 11 7
2 25 × 25 32 26 20 14
3 29 × 29 53 42 32 24
4 33 × 33 78 62 46 34
5 37 × 37 106 84 60 44
7 45 × 45 154 122 86 64
10 57 × 57 271 213 151 119
15 77 × 77 520 412 292 220
20 97 × 97 858 666 482 382
40 177 × 177 2,953 2,331 1,663 1,273

In practice: a 40-character URL fits in version 3 at L or M, version 4 at Q, and version 5 at H. Moving from M to H took that code from 29 × 29 modules to 37 × 37 — about 60% more modules in the same printed square, each correspondingly smaller.

Which level to choose

M for almost everything. Menus, flyers, business cards, posters, screens. It survives normal handling and keeps the code compact.

L when density is the constraint and the environment is clean — a code shown on a screen, or a large amount of data that must fit at a small size. You gain capacity at the cost of robustness.

Q for codes that will take abuse: outdoor signage, warehouse labels, codes on equipment, stickers on things people handle all day.

H for a centre logo, or for the harshest conditions. A logo physically replaces part of the code, so it consumes the error budget before any real-world damage has happened. That is why the generator locks the level to H whenever a logo is present.

Logos: how much can you cover?

H recovers about 30% of codewords, but that does not mean you can cover 30% of the code. Leave margin for real-world damage and printing errors, and keep the logo away from the structural patterns. A safe guideline:

What error correction cannot fix

Some parts of a QR code are not data at all, and no level of error correction can recover them:

Damage these and the scanner cannot even begin decoding. That is why logos go in the centre, and why cropping the margin breaks codes that would otherwise survive serious damage.

Error correction is not a fix for bad design

High error correction is sometimes used to "rescue" a code with poor contrast, a busy background, or an over-sized logo. It does not work that way. Error correction recovers wrong or missing modules; it does not help a scanner that cannot tell dark modules from light ones in the first place. Fix contrast and margins first — see the design guide.

Frequently asked questions

What error correction level should I use for a QR code?

Level M (about 15% recovery) for most uses. Choose Q or H for codes that will be exposed to wear, dirt or weather, and H whenever you place a logo over the centre of the code.

Does higher error correction make a QR code better?

More robust, not better. Each step up makes the code denser at the same size, so its modules get smaller and it needs printing larger to scan from the same distance. Use the lowest level that suits the environment.

How much of a QR code can be covered by a logo?

With level H, keep the logo to around 20% of the code's area, centred, and never over the corner squares. H can recover about 30% of codewords, but you need to leave margin for printing errors and wear.

Can error correction fix a QR code with low contrast?

No. Error correction repairs individual damaged modules once the scanner has found and read the grid. If contrast is too low for the scanner to separate dark from light, there is nothing for error correction to work on.

How do I know what error correction level a QR code uses?

It is stored in the code's format information, and many scanner apps display it. In our generator, the selected level is shown under the preview along with the resulting version and grid size.

Further reading