QR Code Error Correction Explained: L, M, Q, H Levels Guide
Complete guide to QR code error correction levels. Learn how Reed-Solomon algorithms work, when to use L, M, Q, or H levels, and how to choose the right level for logos, damage tolerance, and data capacity.
One of QR codes' most powerful features is their built-in error correction, which allows them to be scanned even when partially damaged, dirty, or obscured. Understanding how error correction works - and when to use each level - is essential for creating reliable QR codes, especially when adding logos or deploying in harsh environments.
Table of Contents
1. What is Error Correction?
Error correction is a technology that adds redundant data to QR codes, allowing them to be read even when portions are damaged, dirty, or obscured. This is what makes QR codes so reliable compared to traditional barcodes.
Error Correction Handles
- Physical damage (scratches, tears)
- Dirt and smudges
- Printing imperfections
- Fading and wear
- Intentional obstruction (logos)
Why It Matters
- Enables logo embedding
- Outdoor durability
- Industrial reliability
- Long-term readability
- Harsh environment tolerance
2. How Reed-Solomon Error Correction Works
QR codes use Reed-Solomon error correction, the same technology used in CDs, DVDs, and satellite communications. Here's a simplified explanation:
Step 1: Data Encoding
Your data (URL, text, etc.) is converted into a series of numbers called codewords.
Step 2: Polynomial Division
The data is treated as a polynomial and divided by a generator polynomial. The remainder becomes the error correction codewords.
Step 3: Redundancy Addition
Error correction codewords are appended to the data codewords. These contain enough information to reconstruct missing or corrupted data.
Step 4: Recovery on Scan
When scanned, the decoder uses the error correction codewords to detect and fix errors in the data codewords, recovering the original message.
The Math Behind It
Reed-Solomon can correct up to (n-k)/2 symbol errors, where n is the total codewords and k is the data codewords. More error correction codewords means more recovery capability but less data capacity.
3. The Four Error Correction Levels
QR codes offer four standardized error correction levels:
| Level | Name | Recovery Capacity | Redundancy |
|---|---|---|---|
| L | Low | ~7% of data can be restored | 20% overhead |
| M | Medium | ~15% of data can be restored | 38% overhead |
| Q | Quartile | ~25% of data can be restored | 55% overhead |
| H | High | ~30% of data can be restored | 65% overhead |
Level L (Low)
Minimum error correction. Best for digital-only use where damage is unlikely and you need maximum data capacity or smallest code size.
Use for: Screens, digital documents, large data
Level M (Medium)
Balanced approach. The default for most QR generators. Good for general print materials with moderate damage risk.
Use for: Standard printing, business cards, marketing
Level Q (Quartile)
Higher protection. Good for industrial use, outdoor signage, or anywhere codes may get dirty or damaged.
Use for: Industrial, outdoor, warehouses
Level H (High)
Maximum protection. Essential when adding logos that obscure part of the code. Also for extreme environments.
Use for: Logos, harsh conditions, long-term
4. Choosing the Right Level
Select your error correction level based on these factors:
| Use Case | Recommended Level | Why |
|---|---|---|
| Website/app display | L or M | No damage risk, optimize for size |
| Business cards | M | Standard handling, wallet storage |
| Product packaging | M or Q | May get scratched during shipping |
| Adding logo | H | Logo intentionally obscures code |
| Outdoor signage | Q or H | Weather, dirt, vandalism risk |
| Warehouse labels | Q or H | Dust, wear, forklift damage |
| Long-term storage (years) | H | Fading, degradation over time |
| Large data capacity needed | L | Minimize code size/complexity |
Default Recommendation
When in doubt, use Level M for standard applications or Level H if you're adding a logo. These cover most use cases effectively.
5. Error Correction for Logos
When you add a logo to a QR code, you're intentionally obscuring data modules. Error correction makes this possible:
Logo Placement Math
- - Level H allows ~30% damage recovery
- - Keep logo to 20-25% of code area (safe margin)
- - Center placement is best (fewer critical modules)
- - Square or circular logos work better than irregular shapes
Common Mistakes
- - Using Level M with a logo (insufficient redundancy)
- - Logo larger than 30% (exceeds recovery capacity)
- - Logo covering finder patterns (three corners)
- - Not testing after logo addition
Best Practice for Logos
Always use Level H when adding a logo. Add a white circle or square background behind the logo to create clean separation from the QR pattern. Test with multiple devices after adding the logo.
6. Impact on Data Capacity
Higher error correction means less space for actual data:
| Level | Numeric Characters | Alphanumeric | Binary Bytes |
|---|---|---|---|
| L | 7,089 | 4,296 | 2,953 |
| M | 5,596 | 3,391 | 2,331 |
| Q | 3,993 | 2,420 | 1,663 |
| H | 3,057 | 1,852 | 1,273 |
Practical Implications
- - Level H has ~57% less capacity than Level L
- - More data = larger, more complex QR code
- - For URLs, the difference rarely matters (URLs are usually short)
- - For vCards or large text, use Level L or M
Pro Tip: Use Short URLs
Dynamic QR codes use short redirect URLs, keeping data minimal regardless of where they ultimately link. This allows you to use Level H without capacity concerns.
7. Real-World Applications
See how different industries use error correction levels:
Manufacturing (Level Q/H)
Parts tracking labels in factories face oil, dust, and physical damage. High error correction ensures scanability through grimy conditions.
Food Packaging (Level M)
Product labels may get wet or scratched but are generally protected. Medium level balances protection with code size.
Digital Marketing (Level L/M)
QR codes in emails, websites, or apps face no physical damage. Low/medium levels optimize for smallest code size.
Event Tickets (Level M)
Digital tickets on phones don't need high error correction. Paper tickets that may fold or smudge benefit from medium level.
Memorial Plaques (Level H)
Outdoor cemetery or memorial QR codes must last decades through weather exposure. Maximum error correction is essential.
8. Testing Error Correction
Verify your error correction level is appropriate for your use case:
Testing Methods
- Damage simulation: Cover portions with tape/paper and attempt to scan
- Environmental testing: Expose to conditions it will face (sunlight, water, dust)
- Device testing: Scan with older phones that may have weaker cameras
- Long-term testing: For critical applications, test after weeks/months of exposure
Damage Test
Print your QR code, then use a marker to black out portions. With Level H, you should be able to obscure up to 30% and still scan successfully.
9. Frequently Asked Questions
Can I change the error correction level after creating a QR code?
No - the error correction level is embedded in the QR code pattern itself. You must generate a new code with the desired level.
Why not always use Level H for maximum protection?
Level H reduces data capacity and creates larger, more complex codes. For digital use or large data, the extra protection isn't needed and the tradeoffs aren't worth it.
Does higher error correction make scanning slower?
Negligibly. The difference is milliseconds and unnoticeable to users. Modern phone processors handle any error correction level easily.
Can error correction fix color contrast issues?
No. Error correction only recovers from missing or damaged modules. It cannot compensate for poor contrast, inverted colors, or other design problems.
What level do most QR generators use by default?
Most use Level M (Medium) as a balanced default. When you add a logo, good generators automatically switch to Level H.
Can I see what error correction level a QR code uses?
Yes! Some QR code analyzer tools can decode and display the error correction level. The level is encoded in the format information near the finder patterns.
Create Reliable QR Codes with the Right Error Correction
QR Mommy automatically optimizes error correction for your use case. Add logos with confidence knowing Level H is applied.
Ready to Create Your Own QR Codes?
Start generating professional QR codes with advanced analytics and customization. No credit card required.
Found this article helpful? Share it with your network!