Guide
QR code error correction levels explained
Every QR code carries spare data that lets a phone read it even when part of it is dirty, torn or covered. Here is how much each level protects, what it costs, and when a logo is safe.
By Mark Stoumann ·
A QR code doesn’t just store your content. It also stores extra error correction data, calculated from your content with a method called Reed-Solomon coding, the same family of codes used on CDs and DVDs. When a phone reads a code with a smudge, a scratch or a torn corner, it uses that extra data to rebuild what’s missing.
How much extra data goes in is up to whoever makes the code. The QR code standard defines four levels:
| Level | Can restore about | Good for |
|---|---|---|
| L (Low) | 7% | Long content on screens and clean, high-quality print |
| M (Medium) | 15% | Most codes: flyers, menus, posters, business cards |
| Q (Quartile) | 25% | Packaging, labels and codes that get handled |
| H (High) | 30% | Outdoor signs, rough surfaces, codes with a logo on top |
The percentages come from Denso Wave, the company that invented the QR code. Its own advice matches the table: Q or H for factory floors where codes get dirty, L for clean conditions with a lot of data, and M as the level chosen most often.
What the percentage actually means
“30%” is easy to misread as “you can cover 30% of the code”. It’s more precise than that. The percentage refers to codewords, the 8-bit blocks the content is split into. At level H, about 30% of those codewords can be wrong or missing and the content can still be rebuilt.
That difference matters in practice for two reasons:
- Not every square is data. The three large squares in the corners, the smaller alignment squares and the thin dotted lines between the corners tell the phone where the code is, which way up it is and how big each square is. Error correction doesn’t restore those. Damage them and the phone may not find the code at all, whatever the level.
- Damage rarely lines up with codewords. A scratch that crosses many codewords can use up the budget faster than its area suggests, while a solid blot that falls on a few neighbouring codewords is easier to repair.
The cost: bigger, denser codes
Error correction data takes up room that could have held content. A higher level means either a denser code (more, smaller squares at the same printed size) or less content. Denso Wave’s capacity tables show the trade-off clearly. This is how many characters of a web address or other text (in bytes) fit into codes of different sizes:
| Version | Squares | 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 |
| 10 | 57 × 57 | 271 | 213 | 151 | 119 |
| 40 | 177 × 177 | 2,953 | 2,331 | 1,663 | 1,273 |
Take a typical 29-character address such as https://yourcafe.com/menu.pdf. At level L it fits in a version 2 code of 25 × 25 squares. At M or Q it needs version 3, at 29 × 29, and at H version 4, at 33 × 33. Printed at the same size, the level H code has squares about a quarter smaller, which are harder for a camera to pick out from a distance. Across the full range, the largest code holds 2,953 bytes at level L but only 1,273 at level H, less than half.
This is why level H isn’t automatically the safe choice. For a long link on a small business card, the extra density can make the code harder to scan than the damage it protects against.
Which level should you choose?
- Start with M. It handles everyday wear, fingerprints and a bit of glare.
- Drop to L when the content is long (a full contact card, a long link) and the code will be shown on a screen or printed cleanly at a good size.
- Go up to Q for codes that will be handled, folded, rained on or printed on textured material such as cardboard or fabric.
- Use H when something will cover part of the code on purpose, such as a logo, or when it will live outdoors for years.
Whatever the level, shorter content helps more than anything else: it keeps the squares large at any print size. If your link is long, a shorter page address on your own site does more for scanning than a higher error correction level.
Adding a logo to a QR code
A logo in the middle of a QR code works because of error correction: the logo destroys some of the data, and the error correction rebuilds it. That means a logo spends some of the code’s damage budget before the code has left the printer, so the finished code is less robust than the same code without one. If you add a logo in a design tool, these rules keep it readable:
- Make the code at level H, so there is as much budget as possible.
- Keep the logo small and centred. Start small and only grow it if tests pass comfortably. There is no safe size that holds for every code, because it depends on the content and on how the logo falls across codewords.
- Never cover the three corner squares, the quiet zone or the edges of the code. Those help the phone find and line up the code, and error correction can’t restore them.
- Give the logo a solid background in the code’s light color, so the camera sees a clean gap instead of half-covered squares.
- Test before you print: several phones, from the real distance, in the real light. The steps for each phone are in how to scan a QR code.
A label next to the code (“Scan for the menu”) often does more for scan rates than a logo inside it, and costs nothing in error correction.
Setting the level in QRCraftr
Every generator on this site has an Error correction setting with the four levels, set to Medium by default. The preview updates as you switch, so you can see how much denser the code gets at Q and H before you decide. Try it with the QR code generator or, for codes with a lot of content, the vCard QR code generator, where the difference is easy to see.
Frequently asked questions
Which QR code error correction level is best?
Medium (M) for most codes. It is the level Denso Wave, the inventor of the QR code, says is chosen most often. Pick Low (L) for long content shown on clean screens or good-quality print, and Quartile (Q) or High (H) for codes that may get dirty, scratched or partly covered, such as on packaging, outdoor signs or behind a logo.
Does higher error correction make a QR code easier to scan?
Not by itself. It makes the code more tolerant of damage, but it also adds more, smaller squares for the same content. For a clean code printed small, that can make it slightly harder to scan. Higher levels pay off when the code will be damaged or covered.
How big can a logo in a QR code be?
There is no safe size you can calculate, because the error correction percentage counts data codewords, not area, and part of the code has to stay untouched. Use level H, keep the logo small and in the centre, never cover the three corner squares or the quiet zone, and test the finished code on several phones.
Can I change the error correction level after printing?
No. The level is part of the printed pattern. To change it, make a new code with the same content and a different level, and replace the printed one.