Skip to content
Interactive Damage Lab

QR Code Error-Correction & Damage Simulator

Scratch, obliterate, and test real-time Reed-Solomon error recovery. Experience firsthand how Level L (7%), M (15%), Q (25%), and H (30%) survive physical damage and tears.

Size:

Click and drag your mouse across the QR code to simulate physical scratches or stains.

Real-Time Reed-Solomon Status
Decodable & Fully Recovered
Reed-Solomon mathematics successfully reconstructed all missing bytes.
Active ECC Level:Level H (~30% Max Recovery)
Surface Area Damaged:0%
Remaining Safe Margin:30.0%

The Mathematics of Reed-Solomon Error Correction in 2D Symbology

The defining feature of QR codes over traditional linear barcodes is their incredible resilience to physical wear and tear. When a barcode on a warehouse box is ripped or scratched horizontally, the scanner cannot read the bars. In contrast, QR codes use Galois Field GF(2^8) Reed-Solomon polynomial math to reconstruct corrupted data bytes on the fly.

Erasures vs Random Errors

In coding theory, there are two distinct categories of data loss:

  • Erasures: Corrupted areas where the decoder knows the location of the damage (such as a ripped corner or an embedded corporate logo). Reed-Solomon can correct up to $R$ erasure codewords, where $R$ is the number of parity check codewords.
  • Random Errors: Corrupted modules where the location is unknown (such as random sensor noise or faint ink splatter). Reed-Solomon requires 2 parity codewords to correct 1 unknown error ($\lfloor R/2 \rfloor$).

Why Finder Patterns Are the Single Point of Failure

As you test in the simulator above, you will notice that scratching out modules in the middle of the code allows it to remain scannable up to 30% damage at Level H. However, if you scratch out just one of the three corner finder pattern squares, the code immediately fails. This is because the camera relies on the three 1:1:3:1:1 geometric patterns to determine perspective, tilt, and the exact coordinate grid before Reed-Solomon decoding even begins.

Frequently Asked Questions About Error Correction

How does Reed-Solomon error correction work in QR codes?

Reed-Solomon is a mathematical error-correcting algorithm that operates in Galois Fields (GF(2^8)). It generates redundant polynomial check bytes that can reconstruct both missing modules (erasures) and corrupted bits without losing data.

Why can I scratch out almost a third of the QR code and it still scans?

At Error Correction Level H (High), 30% of the code’s total data capacity is allocated purely to recovery parity bytes. As long as the three corner finder patterns remain intact, the math reconstructs the obliterated data modules.

What happens if a corner finder pattern is damaged?

Finder patterns are the optical anchors that orient the code in 3D space. While Reed-Solomon can restore data modules, destroying the corner finder squares prevents the camera from detecting the matrix geometry, causing instant scan failure.