Skip to content
Utility8 min read

QR Code Error Correction Guide

Complete guide to QR code error correction. Covers L/M/Q/H levels, Reed-Solomon encoding, and print vs screen use.

SR

Shahid Reza

Founder, ToolmetryAI

QR codes have specific error correction levels that determine how much damage the code can sustain and still scan correctly. Choose the wrong level and your QR code breaks when printed on a wrinkled flyer or when you overlay a logo in the center. This guide explains the four levels (L, M, Q, H), how Reed-Solomon encoding makes error correction work, and which level to use for each common use case.

What Is QR Code Error Correction?

QR codes use Reed-Solomon error correction — the same mathematical algorithm that powers CDs, deep-space communication, and RAID 6 storage. The encoder adds redundant data to the QR code so that if part of the code is damaged, obscured, or modified, the scanner can reconstruct the original data from the redundancy.

The trade-off is simple: more error correction means more redundancy means a denser QR code for the same payload. A QR code with high error correction will have more modules (the individual black and white squares) than the same payload with low error correction. This is why you can't just default to "maximum error correction" — at small print sizes, the denser pattern becomes too fine for scanners to read.

The Four Error Correction Levels

The QR code specification (ISO/IEC 18004) defines four error correction levels. Each level allows the QR code to remain scannable after a specific percentage of the code is damaged:

LevelNameRecovery CapacityTypical Use Case
LLow~7% of codewordsScreen-displayed QR codes, maximum density
MMedium~15% of codewordsStandard print, business cards, indoor signage
QQuartile~25% of codewordsIndustrial use, moderate damage expected
HHigh~30% of codewordsOutdoor signage, packaging, logos in center

"Recovery capacity" is the percentage of codewords (the data units that make up the QR code) that can be damaged or unreadable while the QR code still scans correctly. A level H code can lose 30% of its data — equivalent to a hole punched through a third of the code — and still work.

How Reed-Solomon Error Correction Works

Reed-Solomon encoding treats your data as a polynomial — a mathematical equation where the data values are coefficients. It then evaluates that polynomial at multiple points and stores the results. If some of those results are lost (because part of the QR code is damaged), the encoder can reconstruct the original polynomial from the remaining results, as long as enough results survive.

Concretely: for a level H QR code (30% recovery), the encoder adds roughly 40% more data than the payload requires. The extra 10% margin covers the math overhead of the polynomial reconstruction. Higher error correction levels add more redundancy but also more math overhead, which is why the recovery percentage isn't linear with the redundancy added.

This is the same family of algorithms that lets a scratched CD still play perfectly — audio CDs use Reed-Solomon to recover from scratches affecting up to ~25% of a sector. The math is well over 60 years old (published by Irving Reed and Gustave Solomon in 1960) and battle-tested in domains far harsher than QR codes.

Putting a Logo in the Center of a QR Code

The most common reason to use level H error correction is to embed a logo in the center of the QR code. The logo covers part of the QR pattern — without sufficient redundancy, the scanner can't read the obscured modules. Level H (30% recovery) gives you enough margin to cover roughly 30% of the QR code area with a logo and still scan reliably.

Rules for embedding logos safely:

  • Keep the logo under 25% of the QR code area. Even at level H, going above 30% risks breaking scans on lower-quality cameras.
  • Don't cover the three position-detection squares. These are the large squares in three corners (top-left, top-right, bottom-left). They're how the scanner locates and orients the QR code.
  • Add a white border around the logo. A 4-module-wide white margin between the logo and the QR pattern prevents visual interference.
  • Test with multiple scanners. iPhone Camera, Android Google Lens, Samsung Camera, and dedicated QR apps all use slightly different decoding algorithms. What works on one may fail on another.
  • Avoid logos with high-contrast internal patterns. A logo that looks like QR modules (small black and white squares) confuses the scanner. Use solid color logos with clean edges.

Print vs Screen — Different Requirements

QR codes displayed on screens (websites, apps, digital signage) face almost no physical damage, so level L or M is sufficient. Print introduces real-world risks:

  • Flyers and posters: Level M (15%) is the standard. Handles minor scuffing and folds.
  • Business cards: Level M (15%) — they get bent, written on, and stuffed in wallets.
  • Product packaging: Level H (30%) — packaging is crushed, torn, exposed to weather, and stacked in ways that obscure parts of the code.
  • Outdoor signage: Level H (30%) — UV fading, dirt, weather, and partial obstruction from foot traffic.
  • Restaurant menus: Level Q (25%) — printed on paper that gets wet, folded, and stained.

Minimum QR Code Size for Scanning

Error correction doesn't help if the QR code is too small for the scanner to resolve individual modules. The general rule:

Minimum QR size = 0.4 * scanning distance (in cm)

Examples:

  • Business card (scanned at 10cm): minimum 4cm x 4cm
  • Poster (scanned at 50cm): minimum 20cm x 20cm
  • Billboard (scanned at 5m): minimum 2m x 2m

Below these sizes, individual modules blur together and the scanner can't read them, regardless of error correction level. Higher-density QR codes (more data, or higher error correction) have smaller modules at the same physical size, so they need to be printed larger.

Static vs Dynamic QR Codes

Static QR codes encode the data directly in the QR pattern. Once generated, they cannot be changed. They never expire, work offline, and require no infrastructure beyond the printed code. Use them for permanent use cases: business cards, product packaging, Wi-Fi credentials, vCards.

Dynamic QR codes encode a short URL that redirects to the actual destination. The destination can be changed without reprinting the QR code. Dynamic codes require a backend server (yours or a paid QR service) and stop working if that server goes down. Use them for marketing campaigns where you need to track scans or change destinations post-print.

For most permanent use cases, static is the right choice. ToolmetryAI's QR Code Generator produces static codes with selectable error correction levels — including level H for print use and logo embedding.

Common QR Code Scanning Failures

  • Insufficient contrast: QR codes need at least 4:1 contrast ratio between foreground and background. Dark blue on light blue fails; black on white works.
  • Inverted colors: White-on-black QR codes (inverted) work on some scanners but fail on others. Stick with black-on-white unless you have a specific reason and have tested thoroughly.
  • Missing quiet zone: The blank margin around the QR code (at least 4 modules wide) is required. Text or graphics touching the QR code prevents the scanner from detecting the code boundaries.
  • Skewed perspective: QR codes scanned at extreme angles may fail. The scanner can correct for moderate skew, but photographing a wall-mounted code from floor level usually fails.
  • Glare and reflections: Glossy print finishes cause specular highlights that wash out parts of the QR code. Use matte finish for printed QR codes whenever possible.

Summary — Which Level to Choose

  • Level L (7% recovery): Screen-only QR codes, maximum data density. Don't use for print.
  • Level M (15% recovery): Default for indoor print (business cards, flyers, posters). Good balance of density and robustness.
  • Level Q (25% recovery): Industrial use, restaurant menus, environments with moderate damage risk.
  • Level H (30% recovery): Outdoor signage, product packaging, anytime you want to embed a logo in the center.

Generate QR codes with selectable error correction at our QR Code Generator — it supports all four levels, custom colors, logo embedding, and outputs print-ready PNG/SVG files.

Try the tools mentioned in this article

Frequently Asked Questions

Which QR error correction level should I use for print?
Use level H (30% recovery) for printed materials that may be scuffed, folded, or exposed to weather — flyers, packaging, outdoor signage. Use level M (15% recovery) for clean indoor print like business cards. Level L (7%) is only appropriate for screen-displayed QR codes that won't be physically damaged.
Can I put a logo in the center of a QR code?
Yes, but only with error correction level H (30%). The logo can cover up to ~30% of the QR code area without breaking scannability. Avoid covering the three position-detection squares (the large squares in three corners) — those are required for the scanner to locate the QR code. Test with multiple scanners after adding a logo.
Why does my QR code work on screen but not when printed?
Three common causes: (1) The printed size is too small — minimum 2x2 cm for reliable scanning. (2) The error correction level is too low (L) and the print quality introduces noise. (3) The contrast is insufficient — use black on white, not dark gray on light gray. Re-generate with level M or H and ensure 4:1 contrast ratio minimum.
Do QR codes expire?
Static QR codes (the kind ToolmetryAI generates) never expire — they encode the data directly in the QR pattern. Dynamic QR codes (which redirect through a URL shortener) expire only if the shortener service shuts down. For permanent use cases (business cards, product packaging), always use static QR codes.