QR Code Error Correction Explained: L, M, Q, and H Comparison
Reed-Solomon Algebraic Coding and the Trade-Off with Matrix Density
1. The Four Standard Reed-Solomon Levels
QR codes integrate Reed-Solomon error correction — an algebraic error-correcting code capable of detecting and repairing erased or corrupted symbols within a Galois Field GF(2^8).
There are four standardized levels defined in ISO 18004. As the error correction level rises, more mathematical parity bytes are appended to the payload bitstream, protecting against physical scratches, smudges, dirt, or center logo overlays.
| Level | Data Recovery | Parity Overhead | Best Use Case |
|---|---|---|---|
| Level L (Low) | ~7% recovery | Lowest overhead | Clean indoor displays, long URLs, low camera distance |
| Level M (Medium) | ~15% recovery | Balanced (Default) | General purpose: flyers, table tents, product packaging |
| Level Q (Quartile) | ~25% recovery | High overhead | Industrial labels, outdoor signage, high-wear transit |
| Level H (High) | ~30% recovery | Maximum overhead | Codes with embedded central logos, harsh factory environments |
2. The Matrix Density Cost
Error correction does not come for free. Adding parity codewords increases the total data payload size, forcing the QR encoder to step up to higher matrix versions (e.g. jumping from Version 2 [25x25] to Version 4 [33x33]).
A denser matrix contains significantly smaller individual black modules. In poor lighting or when scanned with low-cost cameras, a high-density Level H code can actually scan slower than a clean Level M code because the camera lens struggles to resolve the tiny module squares.
3. When to Use Center Logos
When you overlay a company icon or brand emblem in the center of a QR code, you are deliberately obscuring the matrix modules underneath. Because the decoder treats that covered region as damaged data, you must configure the generator to Level H (or at least Level Q).
Keep the center logo under 20% of the total QR area, centered squarely, and ensure it does not encroach on any of the three corner finder patterns.
Engineering Recommendation
For standard clean QR codes without logos, Level M offers the optimal balance of defect resilience and generous module sizing.