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:
- Keep the logo to no more than about 20% of the code's area — roughly 45% of its width, centred.
- Never cover the three large corner squares or the area immediately around them.
- Give the logo a small white border so its edges do not merge with neighbouring modules.
- Always test the downloaded file on more than one phone.
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:
- Finder patterns — the three large squares in the corners — tell the scanner where the code is and which way up it is.
- Timing patterns — alternating rows of modules between the finder patterns — establish the grid.
- Format information — copies of the error correction level and mask number next to the finders.
- The quiet zone — the blank margin around the code.
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
- Do QR codes expire? — A QR code itself never expires — but a dynamic code can die when a subscription ends. How to tell which kind you have, and how to get an editable code without the risk.
- GS1 Digital Link: QR codes on products, explained — How GS1 Digital Link puts a product's GTIN, batch and expiry into a QR code that both checkouts and phones can read, what Sunrise 2027 means for brands, and how to build one correctly.
- How QR codes work, from pattern to payload — A clear technical walkthrough of a QR code: the finder and timing patterns, how text becomes bits in each encoding mode, Reed–Solomon error correction, masking, and how a phone reads it.
- How to scan a QR code on any device — Scan QR codes with the built-in camera on iPhone and Android, from a screenshot or photo, on a Windows or Mac computer — and what to do when a code will not scan.