What Is a QR Code and How Does It Work?
A plain-English guide to QR codes — what those black-and-white squares actually are, how they encode data, and why they've become so common.
By QR Ivify Team · Updated July 10, 2026
You've seen them on menus, posters, product packaging, and payment terminals — a small square made of black-and-white blocks that turns into a link, a message, or a Wi-Fi login the moment a phone camera looks at it. That's a QR code, short for "Quick Response" code. Here's what it actually is and how it works under the hood.
A QR code is just a barcode with more room
A traditional barcode — the kind on a can of soup — stores data in one dimension: a series of vertical lines of varying width, read left to right. A QR code stores data in two dimensions, using a grid of black and white squares (called modules) arranged both horizontally and vertically.
That second dimension is what makes QR codes so much more capable. A standard barcode typically holds around 20-25 characters. A QR code can hold thousands of characters — enough for a full URL, a Wi-Fi password, or an entire contact card.
How the data actually gets encoded
Every QR code is built from a few key parts:
- Finder patterns — the three large squares in the corners (top-left, top-right, bottom-left) that tell a scanner "this is a QR code" and help it figure out the code's orientation, even if the photo is rotated or skewed.
- Alignment patterns — smaller squares scattered through the grid that help the scanner correct for distortion, like a code printed on a curved surface.
- Timing patterns — alternating black-and-white lines connecting the finder patterns, used to measure the grid size accurately.
- Data and error-correction modules — the actual payload, encoded as binary and converted into the black/white pattern using the QR standard's encoding rules (numeric, alphanumeric, byte, or kanji mode, depending on the content).
When a scanner reads the code, it locates the finder patterns first, uses the timing patterns to map out the grid, then decodes the remaining modules back into the original data.
Built-in error correction
One of the most useful features of a QR code is Reed-Solomon error correction — the same family of math used in CDs and satellite communications. A QR code can have up to roughly 30% of its modules damaged, dirty, or obscured (for example, by a logo placed in the center) and still scan correctly, because the error-correction data lets the decoder reconstruct the missing pieces.
This is why you can add a logo to the middle of a QR code — as long as you don't cover too much of the pattern and you use a high error-correction level, the code keeps working.
What can a QR code actually store?
The grid pattern itself doesn't "contain" a website or an app — it just encodes text. What happens next depends entirely on how that text is formatted:
- A URL (
https://example.com) opens a browser. - A
WIFI:string with network name and password prompts the phone to join a network. - A
MECARDorvCardstring offers to save a new contact. - A
mailto:ortel:link opens the mail app or dialer. - Plain text just displays as-is.
That's the whole trick: QR codes are a universal container for short text, and phones interpret that text based on its format.
Why QR codes took over
QR codes were invented in 1994 by Denso Wave, a Toyota subsidiary, to track parts on factory floors — their speed and reliability compared to barcodes were exactly what manufacturing needed. They stayed mostly an industrial tool for two decades, until modern smartphones added native camera-based QR scanning (no separate app required), which is what triggered the mainstream boom you've seen in restaurants, packaging, and marketing since.
Today, generating one takes seconds. Try QR Ivify's free QR code generator to create your own — no sign-up, no watermark, and everything renders locally in your browser.
Related articles
QR Code vs Barcode: What Is the Difference?
QR codes and barcodes both encode data for a scanner to read, but they differ in capacity, structure, and use cases. Here's how to tell them apart and when to use each.
How to Create a QR Code for a Calendar Event
How to turn event details into a scannable calendar QR code with QRivify — including supported fields, time zones, and testing before you print.
How to Create a QR Code for a Google Maps Location
How to turn an address, place, or exact coordinates into a scannable Google Maps QR code with QRivify — including customization, testing, and common mistakes.