One of the reasons QR codes are so robust is built into the standard: QR code error correction. It lets a phone read a code that is scratched, partly dirty, slightly torn or covered by a logo. But it is not free: every bit of protection takes space that could have stored data. Choosing the right level is a small decision that has a big effect on how reliably your codes scan.
What is QR code error correction?
Error correction is extra, redundant data added to the code so that missing or misread parts can be reconstructed. QR codes use Reed-Solomon error correction, the same family of algorithms used on CDs, DVDs and in deep-space communication. The QR code standard, ISO/IEC 18004, defines four levels, chosen when the code is generated and stored in the code's format information so that every scanner knows how to decode it.
The four levels: L, M, Q and H
| Level | Approx. data recovery | Density | Best for |
|---|---|---|---|
| L (Low) | about 7% | Lowest | Screens, very clean prints, maximum data |
| M (Medium) | about 15% | Moderate | Most printed materials (good default) |
| Q (Quartile) | about 25% | Higher | Outdoor signs, stickers, textured surfaces |
| H (High) | about 30% | Highest | Codes with a logo, harsh environments |
The percentages describe roughly how much of the code's data codewords can be damaged or missing and still be recovered. They are approximations: where the damage falls matters too.
What does error correction cost?
Redundancy takes room. For the same content, a higher level forces the generator to use a larger version (more modules). At version 40, for example, a code holds 2,953 bytes at level L but only 1,273 bytes at level H. In everyday use, that means:
- a short URL at level H may need a grid of 29 × 29 or 33 × 33 modules instead of 25 × 25 at level L;
- printed at the same size, each module is smaller and needs a closer or better camera;
- to keep the same readability, you must print the code a little bigger.
See QR code data capacity for the full picture of how versions and levels interact.

Which error correction level should you choose?
- Start with M. It suits flyers, menus, business cards, packaging and screens, and keeps the code compact.
- Move to Q for tough conditions: outdoor posters, window stickers, floor graphics, textured paper, fabric or anything that may get dirty or scratched.
- Use H for logos. A logo hides modules in the center; level H gives the margin needed to rebuild them. On the QRCode.boats generator, adding a logo switches the code to H automatically.
- Use L only for screens or when you must fit as much data as possible into a small code and the print quality is excellent.
Error correction and logos: the rules
A logo is intentional damage. To keep it safe:
- Keep the logo in the center and small; it should cover clearly less than the recovery capacity.
- Never cover the three large position squares in the corners, the smaller alignment pattern or the timing lines between corners.
- Do not cover the format information next to the corner squares.
- Prefer a logo with a plain background box so the edge between logo and modules is clean.
- Always test with two phones; reduce the logo if scanning slows down.
How does the scanner use error correction?
When a phone reads a QR code, it first locates the three corner squares, works out the grid, and reads the format information that tells it the error correction level and the mask pattern used. It then reads every module as a dark or light bit and groups them into codewords. If some codewords are wrong because of a scratch, a stain or a logo, the Reed-Solomon decoder uses the redundant codewords to calculate the correct values. As long as the number of damaged codewords stays within the capacity of the chosen level, the original data comes out intact. Beyond that limit, the scanner simply fails rather than returning wrong data, which is why a damaged QR code either works or does not, with no "almost right" result.
What error correction cannot fix
Error correction recovers missing data, not structural problems. It will not save a code that:
- is too small for the scanning distance;
- has insufficient contrast, such as light gray on white;
- has no quiet zone around it;
- is blurred, stretched or printed with spreading ink;
- has damaged corner position markers, which the scanner needs to locate the code.
For those cases, our guide on why a QR code is not scanning lists the fixes.
How to test whether your level is right
- Generate the code with the level you chose and download it.
- Print a proof at the final size on the final material.
- Cover a small part of the code with a finger or a piece of paper (not the corners) and scan again.
- Scan from the real distance and in the real light with an older phone.
- If it fails, either print bigger, shorten the content, or raise the level one step.
You can also upload the file to the online QR code scanner to confirm that the digital version decodes correctly before printing.
Does error correction matter for barcodes too?
Classic 1D barcodes such as EAN-13 or Code 128 have only a check digit or checksum: they can detect an error but not repair it. That is one reason why 2D codes are preferred on surfaces that get damaged. If you also print product barcodes, the barcode generator calculates check digits automatically.
Practical examples
- Restaurant table tent, laminated: level M, or Q if the lamination is glossy and tables get wiped constantly.
- Business card with a vCard: level M to keep the code compact; keep the vCard short.
- Shop window sticker facing the sun: level Q, UV-resistant print.
- Event poster with your brand logo in the middle: level H, printed at least 10 cm wide for a 1-2 m distance.
- Code displayed in a slide presentation: level L or M is enough; make it large on screen.
Key takeaways
- L, M, Q and H recover roughly 7%, 15%, 25% and 30% of the code.
- Higher levels mean denser codes that need to be printed larger.
- M is the best default; Q for outdoors; H for logos.
- Error correction does not fix small size, low contrast or missing margins.
The QR code inventor, Denso Wave, explains the principle on its error correction page. Ready to create a code with the right level? Start with the URL QR code generator.
