Understanding QR Code Error Correction Levels

Learn how QR code error correction works, the four levels (L, M, Q, H), how to choose the right level for your use case, and the trade-offs between data capacity and damage tolerance.

Advanced

Detailed Explanation

QR Code Error Correction

QR codes use Reed-Solomon error correction to remain scannable even when partially damaged, obscured, or dirty. This is one of the key advantages of QR codes over traditional barcodes.

The Four Error Correction Levels

Level Recovery Capacity Best For
L (Low) ~7% damage Digital screens, clean environments
M (Medium) ~15% damage General purpose, most common
Q (Quartile) ~25% damage Printed materials, moderate wear
H (High) ~30% damage Harsh environments, logo overlay

How It Works

Reed-Solomon error correction adds redundant data blocks to the QR code. When a scanner reads the code, it uses these redundant blocks to reconstruct any missing or corrupted data.

The process:

  1. Data encoding — The input data is converted into codewords (8-bit bytes)
  2. Error correction generation — Additional codewords are calculated using polynomial division over Galois Field GF(256)
  3. Interleaving — Data and error correction codewords are interleaved to distribute errors across blocks
  4. Module placement — The combined data is placed into the QR code matrix

Trade-Offs

Higher error correction means:

  • More modules — The QR code becomes larger (higher version) for the same data
  • Less data capacity — More space is used for redundancy
  • Better resilience — The code survives more damage

For example, encoding 100 bytes of data:

EC Level QR Version Modules
L 5 (37x37) 1,369
M 6 (41x41) 1,681
Q 7 (45x45) 2,025
H 8 (49x49) 2,401

Choosing the Right Level

  • Level L — Use for QR codes displayed on screens (phones, monitors) where there is no physical damage risk. Produces the smallest, cleanest code.
  • Level M — The default choice for most applications. Good balance between size and reliability.
  • Level Q — Use for printed QR codes on products, flyers, or materials that may get folded, scratched, or partially covered.
  • Level H — Use when embedding a logo in the center of the QR code, or for outdoor signage, factory floor labels, or any environment with significant wear risk.

Logo Overlay with Error Correction H

A common design technique is placing a brand logo in the center of the QR code. With Level H error correction, up to 30% of the modules can be obscured. The logo should:

  • Cover no more than 10-15% of the total area (to leave margin for other damage)
  • Be placed in the exact center
  • Have a clear border separating it from the QR modules
  • Not overlap with the three finder patterns (the large squares in the corners)

Use Case

Understanding error correction is essential for anyone deploying QR codes in production. It determines whether codes on outdoor signage survive weather, whether product labels remain scannable after shipping, and whether branded QR codes with logo overlays work reliably.

Try It — QR Code Generator

Open full tool