How QR Codes Work: A Plain-English Explanation
What Is a QR Code?
A QR code (Quick Response code) is a two-dimensional barcode that stores data in a grid of black and white squares. Developed by Denso Wave in 1994 for tracking automotive parts in Japan, QR codes were designed to be scanned quickly — hence the name — and to hold far more information than the traditional one-dimensional barcode.
Today they are everywhere: restaurant menus, product packaging, payment apps, business cards, event tickets, and public health campaigns. Virtually every smartphone camera can scan one without a special app.
The Anatomy of a QR Code
A QR code has several distinct regions, each serving a specific purpose:
- Finder patterns — The three large square symbols in the corners. These help scanners quickly locate and orient the code, regardless of rotation or angle.
- Alignment patterns — Smaller squares that help correct for distortion in larger QR codes.
- Timing patterns — Alternating black and white stripes that help determine the size of each data cell.
- Format information — Strips near the finder patterns that encode the error correction level and mask pattern used.
- Data region — The main body of the code where the actual encoded information lives.
- Quiet zone — The white border surrounding the code that tells scanners where the code begins and ends.
How Data Is Encoded
The data in a QR code can be encoded in four modes, depending on the type of content:
- Numeric mode — Only digits 0–9. Most efficient for numbers (e.g., phone numbers, zip codes).
- Alphanumeric mode — Digits, uppercase letters, and a few symbols. Used for URLs and short text.
- Binary/Byte mode — Any ISO-8859-1 or UTF-8 character. The most flexible mode, used for most URLs and general text.
- Kanji mode — Optimized for Japanese characters.
The data is then converted to a binary bitstream, split into data codewords, and arranged in the data region of the grid — placed following a specific zigzag pattern to maximize scan reliability.
Error Correction: Why QR Codes Still Work When Damaged
One of the most impressive features of QR codes is their resilience. QR codes use Reed-Solomon error correction, the same algorithm used in CDs, DVDs, and data transmission. There are four error correction levels:
- Level L (Low) — 7% of data can be restored. Smallest code, but fragile.
- Level M (Medium) — 15% recovery. The most common default.
- Level Q (Quartile) — 25% recovery. Good for codes on physical products.
- Level H (High) — 30% recovery. Allows embedding logos in the center without breaking the code.
This is why you can put a company logo over a QR code and it still scans — the logo obscures data, but the error correction algorithm reconstructs the missing bits.
Create Your Own QR Code
Generate a free QR code for any URL, text, phone number, or contact — instantly in your browser with no sign-up required.
QR Code Generator →How Much Data Can a QR Code Hold?
QR codes come in 40 sizes, called "versions." Version 1 is a 21×21 grid; Version 40 is a 177×177 grid. Maximum data capacity at Version 40, Level L:
- Numeric: 7,089 characters
- Alphanumeric: 4,296 characters
- Binary: 2,953 bytes
A typical short URL (under 50 characters) needs only a Version 3–4 QR code, resulting in a small, clean, easily scannable code.
Dynamic vs. Static QR Codes
A static QR code encodes the destination URL directly. Once printed, it cannot be changed — scanning always goes to the original URL.
A dynamic QR code encodes a short redirect URL. The destination can be changed after printing without reprinting the code. Dynamic codes are better for marketing campaigns, but they require a third-party service to manage the redirects.
Conclusion
QR codes are a brilliant piece of engineering that pack error-correcting data into a compact, scannable image. Their ubiquity today — from restaurant tables to vaccine records — is a testament to how well the original design holds up. Create your own QR code in seconds with our free QR Code Generator.