QR Code Error Correction Explained — L, M, Q, and H Levels
Understand QR code error correction levels L, M, Q, and H. Learn which level to choose for logos, print, outdoor, and digital use.
Error correction is what makes QR codes resilient. A scratched, partially covered, or logo-overlaid QR code can still scan perfectly — if you chose the right error correction level. Here's how it works.
The Four Levels
QR codes use Reed-Solomon error correction, the same algorithm used in CDs and DVDs. It adds redundant data so the original content can be reconstructed even when part of the code is unreadable.
| Level | Name | Recovery Capacity | Module Overhead |
|---|---|---|---|
| L | Low | 7% of data recoverable | Smallest code size |
| M | Medium | 15% of data recoverable | Default in most generators |
| Q | Quartile | 25% of data recoverable | Noticeably larger |
| H | High | 30% of data recoverable | Largest code size |
Which Level to Choose
| Scenario | Recommended Level | Why |
|---|---|---|
| Digital screen display | L | Clean environment, no physical damage risk |
| Standard print (flyer, card) | M | Handles minor print imperfections |
| Adding a small logo (under 10%) | M or Q | Logo covers some modules |
| Adding a larger logo (10-20%) | H | Need maximum recovery to compensate |
| Outdoor signage | Q or H | Weather, dirt, UV fading |
| Industrial/warehouse | H | Dust, scratches, harsh conditions |
| Maximum data density needed | L | Fewest redundant modules = most compact |
The Size Tradeoff
Higher error correction = more redundant modules = a physically larger QR code for the same data. Here's a concrete example with a 40-character URL:
| Level | Version | Modules | Relative Size |
|---|---|---|---|
| L | 3 (29x29) | 841 | Baseline |
| M | 4 (33x33) | 1,089 | +29% |
| Q | 5 (37x37) | 1,369 | +63% |
| H | 6 (41x41) | 1,681 | +100% |
How Reed-Solomon Works (Simplified)
The QR encoder treats data as a polynomial and divides it by a generator polynomial. The remainder becomes the error correction codewords. When a scanner reads the code, it performs the same polynomial division. If the remainder doesn't match, the algorithm can locate and correct errors up to the capacity of the chosen level.
You don't need to understand the math to use QR codes — just know that higher levels sacrifice data density for resilience.
Can I change error correction after creating a code?
No. Error correction is built into the QR pattern during generation. Changing the level means generating a new code entirely.
Does error correction affect scan speed?
Marginally. The scanner needs slightly more processing time for higher correction levels, but on modern phones the difference is imperceptible (milliseconds).
What happens if damage exceeds the correction capacity?
The scanner simply fails to read the code. There's no partial reading or garbled output — QR error correction is all-or-nothing.
Related Articles
- How to Add a Logo to a QR Code — logo overlay requires high error correction
- QR Code Design Best Practices — complete design guide
- QR Code Encoding Formats — data modes and capacity