How QR Codes Work: Inside the Black & White Matrix
Invented in 1994 by Masahiro Hara at Denso Wave, QR codes are 2D optical matrix barcodes capable of encoding data horizontally and vertically.
1. Position Finder Patterns
The three 7x7 module concentric squares in the corners allow optical camera sensors to detect the orientation, angle, and tilt of the code in 360 degrees instantly.
2. Timing & Alignment Patterns
Alternating black and white modules run between finders to establish the grid coordinate system, allowing scanners to correct for distortion on curved surfaces.
3. Reed-Solomon Error Correction
QR codes use Galois Field GF(2^8) Reed-Solomon algorithms to restore damaged data. With Level H error correction, up to 30% of the code can be scratched, dirty, or covered by a custom logo without losing scannability.
4. Mask Patterns
To prevent scanner optical confusion from large solid black or white blocks, one of 8 standard mathematical mask patterns is applied to evenly distribute module density.