QR Code Error Correction Levels Explained
How Reed-Solomon error correction makes QR codes resilient, and how to choose between L, M, Q, and H for your use case.
Why QR Codes Can Survive Damage
One of the most remarkable properties of QR codes is their ability to remain scannable even when partially damaged, dirty, or obscured. This is not luck -- it is the result of a mathematical technique called Reed-Solomon error correction, which is built into every QR code at the encoding level.
Reed-Solomon codes work by adding redundant data to the original message. When a scanner reads the QR code, it uses this redundancy to detect and correct errors -- missing modules, smudged ink, scratched surfaces, or even intentional modifications like logo overlays. The amount of redundancy determines how much damage the code can tolerate.
The Four Error Correction Levels
The QR code specification (ISO/IEC 18004) defines four error correction levels. Each level trades data capacity for damage resistance:
| Level | Name | Recovery Capacity | Best For |
|---|---|---|---|
| L | Low | ~7% of data recoverable | Clean, controlled environments |
| M | Medium | ~15% of data recoverable | General purpose (default) |
| Q | Quartile | ~25% of data recoverable | Industrial, outdoor signage |
| H | High | ~30% of data recoverable | Logo overlays, harsh conditions |
How Error Correction Affects Capacity
There is a fundamental trade-off: higher error correction means more redundant data, which means less room for your actual content. For a Version 10 QR code (57x57 modules), here is how the maximum data capacity changes by error correction level:
| Level | Numeric | Alphanumeric | Binary (bytes) |
|---|---|---|---|
| L | 652 | 395 | 271 |
| M | 513 | 311 | 213 |
| Q | 364 | 221 | 151 |
| H | 288 | 174 | 119 |
Moving from Level L to Level H cuts your data capacity by roughly 56%. This is why choosing the right level matters: you want enough protection for your use case without unnecessarily inflating the QR code size.
How Reed-Solomon Works (Simplified)
Reed-Solomon error correction treats the data in a QR code as a polynomial over a finite field (specifically, GF(28), the Galois field with 256 elements). The encoder evaluates this polynomial at multiple points and appends the results as error correction codewords.
When a scanner reads the QR code, it re-evaluates the polynomial. If the result does not match -- meaning some modules were misread -- the algorithm can pinpoint which codewords are wrong and calculate their correct values. The number of correctable errors depends on how many extra codewords were added, which is determined by the error correction level.
This same algorithm is used in CDs, DVDs, Blu-ray discs, deep-space communication systems, and RAID storage arrays. It is one of the most battle-tested error correction schemes in existence.
Logo Overlays and Error Correction
A common use of high error correction is placing a logo or image in the center of a QR code. Because Level H can recover from 30% data loss, you can obscure up to about 30% of the QR code's modules and it will still scan. In practice, keeping the logo to under 20% of the total area provides a safety margin.
Logo Overlay Guidelines
- 1.Always use error correction Level H when adding a logo
- 2.Keep the logo centered -- the three finder patterns (corners) must remain visible
- 3.Limit logo area to under 20% of the total QR code area
- 4.Test with multiple scanner apps -- not all implementations handle damage equally
- 5.Use a white or light background behind the logo for contrast
Choosing the Right Level
Here are practical guidelines for selecting an error correction level:
Use Level L When:
- The QR code will be displayed on a clean digital screen (website, app, digital menu)
- You need to maximize data capacity (long URLs, large vCards)
- The environment is controlled and the code will not be physically damaged
- File size or pixel density is a concern (smaller QR codes are simpler at Level L)
Use Level M When:
- This is the default and works well for most situations
- Printed materials in indoor settings (flyers, business cards, product packaging)
- The QR code will be handled but not exposed to extreme wear
Use Level Q When:
- Outdoor signage where rain, sun, or dirt may partially obscure the code
- Industrial environments (factory floors, warehouses, shipping labels)
- Situations where the code may be partially covered by tape, stickers, or labels
Use Level H When:
- You plan to overlay a logo on the QR code
- The code will be exposed to extreme conditions (concrete surfaces, vehicle wraps)
- Maximum resilience is more important than maximum data capacity
- The code will be printed at a very small size where individual modules may blur
Try It Yourself
Experiment with different error correction levels using our QR Code Generator. Enter your data, switch between L, M, Q, and H in the customizer panel, and watch how the QR code complexity changes. You can download at each level and test scanning with your phone to see the practical difference.
Further Reading
- ISO/IEC 18004:2015 -- QR Code Specification
The official international standard defining QR code symbology, including error correction requirements.
- Reed-Solomon Error Correction -- Wikipedia
Overview of the Reed-Solomon algorithm used in QR codes, CDs, and deep-space communication.
- QR Code Tutorial -- Thonky
Step-by-step walkthrough of QR code encoding, including error correction codeword generation.