How QR Codes Work: A Simple Explanation
QR codes are everywhere—menus, product packaging, business cards, advertisements. But how do those black and white squares actually work? Here's a simple explanation of the technology behind QR codes.
What Does QR Stand For?
QR stands for Quick Response. The name comes from the code's ability to be scanned and decoded almost instantly. QR codes were invented in 1994 by a Japanese company called Denso Wave to track automotive parts during manufacturing. They needed something faster than traditional barcodes.
How QR Codes Store Information
A QR code is a two-dimensional barcode. Traditional barcodes (like those on groceries) store data in one direction—horizontally. QR codes store data both horizontally and vertically, which lets them hold much more information in the same space.
The black and white squares are called modules. Each module represents a binary digit—black for 1, white for 0. Your phone's camera reads this pattern and converts it back into readable data like a URL, phone number, or text.
A typical QR code can store:
- Up to 3,000 alphanumeric characters
- Up to 7,000 numeric digits
- Up to 4,000 bytes of binary data
That's enough for a website URL, a full contact card, WiFi credentials, or a paragraph of text.
The Parts of a QR Code
Every QR code has several key components:
Finder Patterns
The three large squares in the corners help scanners locate and orient the code. No matter which direction you hold your phone, the scanner can figure out which way is up.
Alignment Pattern
The smaller square (usually near the bottom right) helps correct for distortion if the code is printed on a curved surface or photographed at an angle.
Timing Patterns
The alternating black and white lines between the finder patterns help the scanner determine the size of individual modules.
Data Area
Everything else is data. This is where your URL, text, or other information is encoded.
Quiet Zone
The white border around the code is required. It helps scanners identify where the code ends and the background begins. Cutting into this border can make codes unscannable.
Error Correction: Why Damaged Codes Still Work
QR codes have built-in error correction. Even if part of the code is damaged, dirty, or covered, it can often still be scanned successfully.
There are four error correction levels:
- L (Low): 7% of data can be restored
- M (Medium): 15% of data can be restored
- Q (Quartile): 25% of data can be restored
- H (High): 30% of data can be restored
This is why you can put a logo in the center of a QR code and it still works—the error correction compensates for the covered modules.
How Your Phone Scans QR Codes
When you point your camera at a QR code, here's what happens:
- Detection: The camera identifies the finder patterns and locates the code
- Orientation: The scanner determines which way the code is rotated
- Grid mapping: The timing patterns help map out the module grid
- Data extraction: Each module is read as a 1 or 0
- Error correction: Any damaged or unreadable sections are reconstructed
- Decoding: The binary data is converted to readable text
- Action: Your phone opens the URL, displays the text, or saves the contact
This entire process happens in milliseconds.
Static vs. Dynamic QR Codes
There are two types of QR codes:
Static QR Codes
The destination URL is encoded directly in the pattern. The code always goes to the same place and cannot be changed after creation. If you need to update the destination, you must create a new code.
Dynamic QR Codes
The code points to a redirect URL. When scanned, it passes through a server that forwards to your actual destination. This means you can change where the code goes without reprinting it.
Dynamic codes also enable tracking and analytics—you can see how many times your code was scanned, when, and from where.
What QR Codes Can Link To
QR codes can trigger different actions depending on what's encoded:
- Website URL: Opens a web page
- vCard: Saves contact information to your phone
- WiFi credentials: Connects to a network automatically
- Phone number: Starts a call
- SMS: Opens a pre-filled text message
- Email: Opens a pre-filled email
- Calendar event: Adds an event to your calendar
- Plain text: Displays a message
- App store link: Opens an app download page
Why QR Codes Are Reliable
QR codes became the standard for a reason:
- Fast scanning: Near-instant recognition
- High capacity: Store much more than traditional barcodes
- Error tolerance: Work even when partially damaged
- Angle flexibility: Scan from any direction
- Universal support: Every smartphone can read them
- Free to create: No licensing fees
Create Your Own QR Codes
Ready to put QR codes to work for your business? Create a free QR code with QR Code Better. Our dynamic codes include tracking, are editable anytime, and never expire.