How QR Codes Work: The Technical Explanation (Without Jargon)
QR codes store a surprising amount of data in a small black-and-white square. This guide explains the encoding, error correction, and design choices behind QR codes.
A QR code (Quick Response code) stores data in a two-dimensional grid of black and white modules. It can encode URLs, text, contact info, WiFi credentials, and more. Understanding the technology explains why QR codes are so durable and reliable.
Anatomy of a QR Code
- Finder patterns: Three large squares in the corners. Cameras use these to detect orientation.
- Alignment patterns: Smaller squares inside (for larger codes) that help correct for distortion.
- Timing patterns: Alternating black/white lines that help decode the grid.
- Format information: Error correction level and mask pattern.
- Data region: The actual encoded data (URL, text, etc.).
- Quiet zone: White border around the code โ needed for scanner to detect the edges.
Error Correction: Why QR Codes Work When Damaged
QR codes use Reed-Solomon error correction โ the same algorithm used in CDs, DVDs, and space communications. There are 4 levels:
- L (Low): Can restore 7% of data โ smallest QR code
- M (Medium): Can restore 15% of data โ default for most uses
- Q (Quartile): Can restore 25% of data โ used with logos
- H (High): Can restore 30% of data โ for harsh environments
This error correction is what allows branded QR codes with logos to work โ the logo covers part of the data, but error correction reconstructs it.
How Much Data Can a QR Code Hold?
- Numeric only: up to 7,089 characters
- Alphanumeric: up to 4,296 characters
- Binary/byte: up to 2,953 characters
- Kanji/Kana: up to 1,817 characters
Generate QR codes with our QR Code Generator.