Published June 2026 · 6 min read

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

  1. What is error correction in QR codes?
  2. The four error correction levels
  3. Which level should you use?
  4. How error correction enables QR code logos
  5. Tradeoffs: density vs resilience

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.

L
~7% recovery

Lowest redundancy. Smallest, densest code. Use in clean, controlled environments.

M
~15% recovery

Default for most generators. Good balance of size and resilience for general use.

Q
~25% recovery

Recommended for industrial and manufacturing environments where dirt or damage is likely.

H
~30% recovery

Maximum redundancy. Required for codes with overlaid logos or heavy branding.

LevelNameMax Data RecoveryCode Size ImpactBest For
LLow~7%SmallestDigital screens, clean indoor signage
MMedium~15%SmallGeneral purpose, most print applications
QQuartile~25%MediumIndustrial labels, outdoor environments
HHigh~30%LargestBranded 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:

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.

ScenarioRecommended LevelReason
Website URL on a digital screenL or MNo physical damage possible; keep code small
Business card (URL)MClean environment; balance size and resilience
Restaurant table tentMMild handling; M provides ample protection
Outdoor poster or signageQWeather, dirt, and UV exposure
Warehouse / industrial labelQ or HHarsh physical conditions
Logo-embedded QR codeHLogo occludes part of code; maximum recovery needed
Metal-etched or laser-engravedHProcess 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.

Generate Your QR Code →

Also read: QR Code Size Guide · What Is a QR Code? · QR Codes for Business