QR Code Error Correction Explained: Levels L, M, Q & H
One of the most useful — and least understood — features of QR codes is their built-in ability to recover from damage, dirt, or obstruction. This error correction capability is defined in the ISO/IEC 18004 standard and comes in four levels that trade code density against resilience. Understanding them helps you make better decisions when generating codes for real-world use.
Contents
What Is Error Correction in QR Codes?
QR codes use a mathematical technique called Reed-Solomon error correction — the same algorithm used in CDs, DVDs, QR codes, and deep-space communications — to encode redundant data alongside the primary payload. When a scanner reads a damaged or partially obscured code, it uses that redundant data to reconstruct any missing or corrupted information.
Reed-Solomon error correction was developed by mathematicians Irving Reed and Gustave Solomon at MIT Lincoln Laboratory in 1960, and it remains one of the most robust error correction algorithms in practical use. In the context of QR codes, the algorithm is applied per the ISO/IEC 18004 specification, which defines exactly how redundancy is calculated and applied across the four correction levels.
In plain terms: Error correction means your QR code can still scan correctly even if part of it is physically damaged, obscured by a logo, smudged, or poorly printed — as long as the damage doesn't exceed the correction level's tolerance.
The Four Error Correction Levels
The ISO standard defines four error correction levels, each identified by a letter. The percentage represents the maximum proportion of the code's data codewords that can be restored after damage.
Lowest redundancy. Smallest, densest code. Use in clean, controlled environments.
Default for most generators. Good balance of size and resilience for general use.
Recommended for industrial and manufacturing environments where dirt or damage is likely.
Maximum redundancy. Required for codes with overlaid logos or heavy branding.
| Level | Name | Max Data Recovery | Code Size Impact | Best For |
|---|---|---|---|---|
| L | Low | ~7% | Smallest | Digital screens, clean indoor signage |
| M | Medium | ~15% | Small | General purpose, most print applications |
| Q | Quartile | ~25% | Medium | Industrial labels, outdoor environments |
| H | High | ~30% | Largest | Branded QR codes with logos, harsh environments |
Which Level Should You Use?
Level L — Digital and Screen Use
Level L produces the smallest, most data-efficient QR code. It's appropriate when the code will be displayed on a clean digital screen (website, app, email) where no physical damage or dirt is possible. At level L, a code can recover from about 7% corruption — which sounds low, but on a clean screen that's more than sufficient.
Level M — General Print (Recommended Default)
Level M is the sensible default for most print applications — business cards, brochures, flyers, and signage in reasonably clean environments. The 15% recovery tolerance handles minor print imperfections, light scuffs, and the natural degradation of paper over time. Most QR code generators, including ours, default to Level M for this reason.
Level Q — Industrial and Outdoor Use
Level Q is recommended when the code will be used in environments where physical damage is more likely: warehouse labels, outdoor signage exposed to weather and dirt, product packaging that gets handled heavily, or anywhere codes might be partially obscured by stickers or ink smears. The 25% recovery rate provides meaningful protection against real-world wear.
Level H — Logos and Harsh Environments
Level H is essential when you plan to overlay a logo or graphic on top of the QR code. It's also appropriate for the harshest physical environments — metal stamping, laser etching, or printed labels that will be exposed to industrial chemicals or extreme conditions. The 30% recovery rate means a logo covering up to roughly a quarter of the code's surface area can still be scanned reliably.
How Error Correction Enables QR Code Logos
The practice of placing a company logo in the centre of a QR code has become common in marketing materials. This is only possible because of error correction: the logo physically obscures part of the code, and the error correction algorithm reconstructs the hidden data during scanning.
For logo-embedded QR codes, you should:
- Always use Level H error correction
- Keep the logo to no more than 30% of the code's total area (some sources say 20% for a safety margin)
- Place the logo in the centre of the code, away from the three finder patterns (the square corners)
- Use a white or light background behind the logo so the surrounding modules remain readable
- Always test the final code on multiple devices before production
Important: Always scan-test logo-embedded QR codes on at least three different devices before printing. The 30% theoretical recovery rate does not guarantee success in every case — practical limits vary by scanner, lighting, and print quality.
Tradeoffs: Density vs Resilience
Higher error correction levels produce physically larger QR codes because more modules are needed to store the redundant data. For the same payload, a Level H code requires roughly 2.5× more modules than a Level L code.
This matters when print space is tight. On a business card, switching from Level M to Level H for the same URL makes the code noticeably larger or, at the same physical size, more difficult to scan because each individual module becomes smaller.
The practical resolution: shorten your URL. Instead of encoding a long URL directly, use a short link (your own or a service like Bitly) to reduce the payload. This allows you to use Level H while keeping the code compact and scannable.
| Scenario | Recommended Level | Reason |
|---|---|---|
| Website URL on a digital screen | L or M | No physical damage possible; keep code small |
| Business card (URL) | M | Clean environment; balance size and resilience |
| Restaurant table tent | M | Mild handling; M provides ample protection |
| Outdoor poster or signage | Q | Weather, dirt, and UV exposure |
| Warehouse / industrial label | Q or H | Harsh physical conditions |
| Logo-embedded QR code | H | Logo occludes part of code; maximum recovery needed |
| Metal-etched or laser-engraved | H | Process may degrade fine module edges |
Generate a QR code with the right error correction level
Our free generator lets you choose error correction level L, M, Q, or H — with instant SVG or PNG download.
Also read: QR Code Size Guide · What Is a QR Code? · QR Codes for Business