What is a QR Code? History, Types & How It Works
QR codes are everywhere — on restaurant menus, product packaging, event tickets, and advertisements. But what exactly are they, and how do those small black-and-white squares store information?
A Brief History of QR Codes
QR code stands for Quick Response code. It was invented in 1994 by Masahiro Hara at Denso Wave, a Japanese subsidiary of Toyota. The original purpose was to track automotive parts during manufacturing — conventional barcodes were too limited in the amount of data they could store.
Unlike traditional barcodes that store data in one dimension (horizontal lines), QR codes store data in two dimensions — both horizontally and vertically. This allows them to hold significantly more information: up to 7,089 numeric characters or 4,296 alphanumeric characters.
Denso Wave released the QR code specification publicly and chose not to enforce their patent rights, which led to widespread adoption. Today, QR codes are standardized under ISO/IEC 18004.
How QR Codes Store Data
A QR code is made up of black and white modules (squares) arranged in a grid. Here's how the different parts work:
Finder Patterns
The three large squares in the corners (top-left, top-right, bottom-left) are finder patterns. They help scanners quickly locate and orient the QR code, even if it's tilted or partly obscured. This is why QR codes can be scanned from any angle.
Alignment Pattern
Larger QR codes (version 2 and above) include smaller alignment patterns to help correct for distortion — such as when the code is printed on a curved surface.
Timing Patterns
The alternating black-and-white modules between the finder patterns form timing patterns, which help the scanner determine the grid size.
Data and Error Correction
The remaining area contains the actual encoded data plus error correction codewords. The data is encoded using one of four modes:
- Numeric mode — digits 0-9 (most efficient, ~3.3 bits per character)
- Alphanumeric mode — digits, uppercase letters, and some symbols (~5.5 bits per character)
- Byte mode — any 8-bit data, including UTF-8 text (8 bits per character)
- Kanji mode — Japanese characters (~13 bits per character)
Error Correction Levels
One of the most remarkable features of QR codes is their built-in error correction using Reed-Solomon error correction. This means QR codes can still be read even if part of the code is damaged, dirty, or obscured.
There are four error correction levels:
| Level | Recovery Capacity | Best For |
|---|---|---|
| L (Low) | ~7% damage recovery | Maximum data capacity |
| M (Medium) | ~15% damage recovery | General use (default) |
| Q (Quartile) | ~25% damage recovery | Industrial, outdoor use |
| H (High) | ~30% damage recovery | Codes with logo overlay |
Level H is often used when a logo or image is placed in the center of the QR code — the error correction compensates for the "damaged" area.
Types of QR Codes
Static QR Codes
Static QR codes encode data directly. Once created, the encoded content cannot be changed. They're free to generate and don't require an internet connection to scan. Best for: permanent information like WiFi passwords, contact cards, or fixed URLs.
Dynamic QR Codes
Dynamic QR codes encode a short redirect URL instead of the final content. The destination can be changed after the code is printed, and scan analytics (location, time, device) can be tracked. Best for: marketing campaigns, menus that change, or content that needs updating.
Micro QR Codes
Micro QR codes are a compact version that uses only one finder pattern (instead of three), allowing them to be printed in very small spaces. They hold less data but are perfect for electronics or small product labels.
QR Codes vs. Barcodes
| Feature | 1D Barcode | QR Code |
|---|---|---|
| Data capacity | ~20-25 characters | Up to 7,089 characters |
| Data type | Numbers (typically) | Text, URLs, binary data |
| Error correction | Check digit only | Reed-Solomon (7-30%) |
| Scan angle | Must be horizontal | Any angle (360°) |
| Size | Width depends on data | Fixed square shape |
Common Uses of QR Codes
- Payments — UPI, WeChat Pay, and Alipay all use QR codes for contactless payments
- Restaurant menus — scan to view digital menus, especially popular since 2020
- Event tickets — boarding passes, concert tickets, and conference badges
- Product packaging — link to manuals, warranty registration, or product details
- Business cards — encode contact details as a vCard for one-scan saving
- WiFi sharing — guests scan to connect without typing the password
- Authentication — two-factor authentication apps use QR codes to set up TOTP
How to Scan a QR Code
Most modern smartphones can scan QR codes directly with the built-in camera app. Simply point the camera at the QR code — no need to take a photo — and a notification or link will appear.
For more advanced features like scan history, batch scanning, CSV export, and barcode support, dedicated scanner apps like Scan & Generate provide additional functionality.