QR code error correction levels explained
By Pradip Dhakal · · 6 min read
The short answer
Error correction is spare data stored in every QR code, so a scanner can rebuild parts that are dirty, scratched or covered. There are four levels: L restores about 7% of the code, M about 15%, Q about 25% and H about 30%. Higher levels survive more damage but add squares, which makes the code denser. M suits most printed codes; use H when you add a logo.
On this page
What error correction does
A QR code stores your content as a series of bytes, called codewords. Alongside them, it stores extra codewords calculated from your data with a method called Reed–Solomon coding, from the same family of math that kept scratched CDs playing. When some squares can’t be read, the scanner uses the extra codewords to work out what was there.
Every QR code has error correction, and you can’t turn it off. What you choose is how much. The QR code standard, ISO/IEC 18004, defines four levels:
| Level | Restores about | Best for |
|---|---|---|
| L (Low) | 7% of codewords | Screens, and codes that hold a lot of data |
| M (Medium) | 15% | Most printed codes |
| Q (Quartile) | 25% | Outdoor signs, packaging and labels that get handled |
| H (High) | 30% | Codes with a logo, and harsh conditions |
The percentages count codewords, not printed area. Each codeword is a small block of about eight squares, and the blocks are spread across the code. A neat patch of damage in one place touches few codewords; a thin scratch across the whole code touches many, and uses up the budget faster than its size suggests.
The trade-off: more correction, more squares
Spare codewords take space. For the same content, a higher level needs more squares, so the code either gets denser at the same printed size or has to be printed larger. A short link like yoursite.com/menu fits in 25 × 25 squares at L and M, needs 29 × 29 at Q and 33 × 33 at H.
The gap widens with longer content. A 119-character link full of tracking tags needs 41 × 41 squares at L but 57 × 57 at H. At the same printed width, each square at H is about 28% smaller, so to scan from the same distance the code has to be printed about 40% wider.
Our print size guide has a calculator that accounts for this, including the extra squares a logo brings.
What error correction can’t fix
The levels protect your data, not everything a scanner needs. Some parts of a code have no spare copy:
- The three corner squares. These finder patterns tell the scanner where the code is and which way up it sits. Cover or damage one, and many scanners won’t find the code at all, whatever the level.
- The quiet zone. The clear border around the code isn’t data, so no level makes up for text, a frame or a photo crowding it.
- Low contrast and blur. If the scanner can’t tell dark squares from light ones across the whole code, every codeword is in doubt at once.
- Wrong content. Error correction restores what was encoded. A code with a typo in the link scans perfectly and opens the wrong page.
One part is extra tough: the format information, which tells the scanner the level and the pattern used, is stored twice with its own protection, so a code survives damage to one of the copies.
Logos and error correction
A logo in the middle of a QR code works by hiding squares on purpose and letting error correction rebuild them. That’s why codes with logos should use level H: it has the largest budget to spend.
Don’t spend all of it. Scratches, glare and a shaky hand need part of the budget too, so a logo should hide well under the level’s limit. A logo a fifth of the code’s width covers about 4% of its area; a third of the width covers about 11%; half the width covers 25%, which leaves almost nothing for real-world wear.
- Use level H with any logo. Our generator switches to it automatically.
- Keep the logo to about a third of the code’s width or less, with a little clear padding around it.
- Center it, well away from the three corner squares, which must stay clear.
- Test it with two different phones before you print.
Our QR code generator raises error correction to High when you add a logo, warns you when the logo hides more than the code can safely rebuild, and test-scans every design before you download it.
Which level should you choose?
- M for most codes. Menus, flyers, business cards and indoor posters. It balances size and toughness, and it’s the usual default.
- L for screens and long content. Codes on a website, slide or TV don’t get scratched, so the smaller, cleaner pattern wins. L also holds the most: up to 2,953 bytes in the largest code size, against 1,273 at H.
- Q for tough places. Outdoor signs, warehouse labels, product packaging that gets handled and stickers on equipment.
- H for logos and harsh conditions. Anything with a logo, codes printed on fabric or rough surfaces, and codes that must keep working as they wear.
Not sure? Leave our generator on Auto: it uses M, and switches to H when you add a logo. You can override it in the design options.
Making a code tougher without raising the level
A higher level isn’t the only way to make a code survive. Often these help more:
- Shorten the content. Fewer characters mean fewer, larger squares, which tolerate wear better than a dense code at a higher level.
- Print it bigger. Larger squares shrug off scratches, dirt and blur.
- Pick the material. Matte, UV-resistant or laminated prints stay readable longer outdoors.
- Keep the quiet zone clear, at least two squares wide. The standard asks for four.
And check printed codes now and then. Error correction quietly hides wear until the day it runs out, so a code that has started to scan slowly is one to replace.