8 min read
Updated: December 2024
QR Code Anatomy
How Data is Encoded
QR Code Versions
How Scanning Works
Error Correction
FAQ
Every QR code is made up of several distinct components, each serving a specific purpose. Understanding these parts helps explain why QR codes are so reliable and can be scanned from any angle.
The three large squares in corners that help scanners locate and orient the QR code.
Smaller squares that help correct distortion, especially in larger codes.
Alternating black/white lines between finder patterns that help determine module size.
Contains error correction level and mask pattern used.
Identifies the QR code version (size) for versions 7 and above.
The actual encoded data plus redundancy for error recovery.
White border around the code that helps scanners identify edges.
QR codes convert your data into a pattern of black and white modules (squares). The encoding process involves several steps:
The encoder chooses the most efficient mode based on your data type: Numeric, Alphanumeric, Byte, or Kanji.
Characters are converted to binary based on the selected mode. Numbers are most efficient, followed by alphanumeric.
Reed-Solomon error correction codes are calculated and added. This is what allows damaged codes to still work.
The binary data is placed in a specific zigzag pattern, avoiding the functional patterns (finders, timing, etc.).
A mask pattern is applied to balance the number of black and white modules, improving scannability.
Numeric: 0-9 only → 3.3 bits per character (most efficient)
Alphanumeric: 0-9, A-Z, space, $%*+-./: → 5.5 bits per character
Byte: Any character (UTF-8) → 8 bits per character
Kanji: Japanese characters → 13 bits per character
QR codes come in 40 different "versions," each with a different size. Version 1 is the smallest (21×21 modules), and Version 40 is the largest (177×177 modules). The version is automatically selected based on how much data needs to be encoded.
| Version | Size | Capacity* | Best For |
|---|---|---|---|
Version 1 | 21×21 | ~25 | Short URLs, simple text |
Version 10 | 57×57 | ~174 | Medium URLs, contact info |
Version 20 | 97×97 | ~858 | Long text, detailed vCards |
Version 40 | 177×177 | ~4,296 | Maximum data capacity |
When you scan a QR code with your phone, here's what happens in milliseconds:
The camera detects the three finder patterns and locates the QR code in the image.
Using the finder patterns, the scanner determines the code's rotation and perspective.
The timing patterns help establish a grid, and each module is sampled as black or white.
The format information reveals the error correction level and mask pattern used.
The scanner reads the data in the zigzag pattern, applies the mask, and extracts the binary.
Reed-Solomon decoding corrects any errors from damage or scanning issues.
The decoded data is interpreted (URL, text, contact, etc.) and presented to the user.
One of QR codes' most powerful features is built-in error correction. Using Reed-Solomon error correction, QR codes can recover from damage, dirt, or even intentional modifications (like adding a logo).
~7% recovery
~15% recovery
~25% recovery
~30% recovery
Up to about 4,296 alphanumeric characters or 7,089 numeric digits at maximum capacity (Version 40 with Low error correction). Practical limits are lower for reliable scanning.
These are finder patterns. They help scanners quickly locate the QR code and determine its orientation, allowing codes to be scanned from any angle.
Yes! QR codes use Reed-Solomon error correction. Depending on the level chosen, up to 30% of the code can be damaged or obscured and still scan correctly.
QR code size (version) increases with data amount. More data requires more modules, resulting in a larger, denser code. Version 1 has 21×21 modules, Version 40 has 177×177.
Use our free QR code generator to create custom QR codes in seconds.
Create Your QR Code