HD QR Code
Back to all guides
Engineering·7 min read·Published January 18, 2026

Reed-Solomon Error Correction in QR Codes: Levels L, M, Q, and H

Written by HD QR Code Editorial Team (Technical Contributor)

A deep technical dive into Reed-Solomon algebraic error correction algorithms, exploring mathematical redundancy blocks, codeword recovery capacities, matrix density trade-offs, and logo integration rules.

Reed-Solomon error correction engineering diagram showing QR code finder patterns, data codewords, and parity redundancy levels L, M, Q, H
Figure 1: Isometric engineering schematic of Reed-Solomon algebraic error correction blocks, codeword interleaving, and recovery capacities across levels L (7%), M (15%), Q (25%), and H (30%).

Key Takeaways

  • QR codes use Reed-Solomon error correction, the same algebraic coding mathematics used on compact discs, satellite communications, and RAID storage.
  • Four standardized error correction levels exist: Level L (7%), Level M (15%), Level Q (25%), and Level H (30%).
  • Higher error correction adds parity codewords, increasing module density and shrinking individual module size for a given print area.
  • Embedding center brand logos physically overwrites data modules and strictly requires Error Correction Level H (30%).
  • For general unadorned web links and handheld print materials, Level M provides the optimal balance between error recovery and module size.

The Mathematical Foundations of Reed-Solomon Codewords

Quick Response (QR) codes are remarkably resilient against physical damage, dirt, and partial obscuration thanks to Reed-Solomon algebraic error correction. Developed in 1960 by mathematicians Irving S. Reed and Gustave Solomon at MIT Lincoln Laboratory, Reed-Solomon coding is an overdetermined system of linear polynomials over Galois fields (specifically GF(2^8)).

In a QR code, the encoded data is broken into 8-bit bytes known as data codewords. The Reed-Solomon generator polynomial processes these data blocks and calculates additional error-correcting parity codewords (check bytes). These parity codewords are interleaved throughout the 2D matrix alongside the primary payload data.

When a smartphone camera scans a damaged or partially covered QR code, the decoder runs the Berlekamp-Massey or Euclidean algorithm to calculate an error locator polynomial. As long as the number of corrupted or missing codewords does not exceed the mathematical correction capacity, the original data bitstream is reconstructed with 100% mathematical certainty.

Understanding the Four ISO Error Correction Levels (L, M, Q, H)

The ISO/IEC 18004 standard defines four standardized error correction levels, each dedicating a specific percentage of total matrix codewords to Reed-Solomon parity data:

1. Level L (Low): Reconstructs approximately 7% of missing or damaged codewords. It produces the least dense matrix grid with the fewest modules. Best suited for clean digital screen displays, pristine indoor signage, and extremely small print areas where module size must be maximized.

2. Level M (Medium): Reconstructs approximately 15% of damaged codewords. This is the global industrial default for general commercial marketing collateral, flyers, business cards, and direct mail.

3. Level Q (Quartile): Reconstructs approximately 25% of damaged codewords. Recommended for high-traffic environments, restaurant table tents exposed to food spills, equipment service stickers, and transit bulletin boards.

4. Level H (High): Reconstructs approximately 30% of damaged codewords. This level is strictly required whenever a brand emblem or logo is placed in the center of the code, or when printing on outdoor construction equipment, warehouse floor decals, or wristbands subject to extreme physical abrasion.

The Trade-Off: Error Recovery Headroom vs. Matrix Grid Density

Choosing an error correction level involves an engineering trade-off: higher error correction provides greater resilience against damage, but requires more parity codewords. This increases the QR version grid size, packing more modules into the same physical square.

For example, consider a 40-character web URL printed at 25 mm × 25 mm:

- At Level L: Encodes into Version 2 (25×25 modules). Each module measures 1.00 mm wide.

- At Level H: Requires Version 4 (33×33 modules). Each module shrinks to 0.76 mm wide.

If a QR code contains no center logo and is printed in a clean indoor medium (such as a professional business card), choosing Level H unnecessarily shrinks module dimensions, making the code harder for budget camera lenses to resolve. Level M is therefore the optimal default for unadorned print collateral.

Designing Branded Codes: How Level H Accommodates Center Logos

When graphic designers place a brand logo or custom icon in the center of a QR code, they are not using a specialized "logo QR format". Rather, they are deliberately destroying functional data modules in the central region of the matrix.

This visual branding succeeds solely because the Reed-Solomon decoder treats the covered modules as erased codewords. Because Level H can reconstruct up to 30% of total codewords, a logo occupying 18% to 20% of the surface area leaves approximately 10% to 12% of error correction capacity in reserve.

This remaining reserve budget is vital: if a designer expands the logo to cover 28% of the code, a tiny lighting reflection or fingerprint smudge will exceed the 30% threshold, rendering the code completely unscannable. Always keep center logos under 20% of total surface area and maintain a 1-module white buffer pad around the logo artwork.

Environmental Degradation: Protecting Outdoor Signage and Industrial Tags

In industrial manufacturing, logistics, and outdoor architecture, barcodes face environmental stresses: UV sunlight fading, rain and humidity, mechanical scuffs from forklifts, and dust accumulation.

For outdoor warning signs, utility pole decals, and warehouse shelf tags, Error Correction Level Q (25%) or Level H (30%) is mandatory. Even if a corner is scratched by shipping straps or faded by solar exposure, the Reed-Solomon algorithm seamlessly reconstructs the asset identification number, preventing downtime in logistics operations.

How to Select the Optimal Error Correction Level for Your Project

Follow this rule of thumb when generating QR codes:

- Use Level L (7%) only when module size is extremely critical, payload text is long, and the display medium is clean (e.g., HD digital monitors).

- Use Level M (15%) for 80% of real-world use cases: business cards, brochures, flyers, direct mail, and packaging without logos.

- Use Level Q (25%) for tabletop restaurant stands, event wristbands, and public bulletin board posters exposed to handling.

- Use Level H (30%) whenever embedding a brand logo, or when printing on high-wear industrial machinery labels.

Ready to generate a permanent static QR code?

Create direct static codes with instant client-side decode verification and infinite-resolution vector SVG downloads.

Open Free Generator

Scan-tested in your browser

Built on the ISO/IEC 18004 standard with zero paywalls.

No Expiration for Static Codes

Direct static encoding with zero redirect intermediaries.

Private by Design

Your QR content is processed in your browser and never uploaded.

Reed-Solomon Error Correction in QR Codes: Levels L, M, Q, and H | HD QR Code