QR code error correction is a built-in feature that enables QR codes to be successfully scanned even when a portion of the code is damaged, dirty, or obscured. This capability uses Reed-Solomon error correction codes, the same mathematical technique used in CDs, DVDs, and satellite communications.
QR codes offer four levels of error correction: L (Low, recovers up to 7% damage), M (Medium, 15%), Q (Quartile, 25%), and H (High, 30%). Higher error correction levels increase the QR code's resilience but also increase its size because more data modules are needed to store the redundant error correction information. Error correction books on Amazon explain the mathematics.
The choice of error correction level depends on the use case. For QR codes printed on product packaging that may get scratched, level H provides maximum resilience. For QR codes displayed on clean digital screens, level L is sufficient and produces the smallest code. For QR codes with embedded logos (which intentionally obscure part of the code), level H is necessary to compensate for the covered area.
In URL shortening, the combination of a short URL (which produces a simpler QR code) and an appropriate error correction level ensures reliable scanning across diverse conditions. QR code implementation books on Amazon discuss optimization strategies.