What is a QR code and how does it work? A simple guide
What a QR code is, who invented it, what the black squares do, how your phone reads one in a second, and how much it can hold. Plain words, no jargon.
QR Hub team · · 6 min read
Short answer: a QR code is a square barcode that your phone camera can read in a second. The black and white squares store text — most often a web address — and your phone turns that pattern back into the text and offers to open it.
This guide explains where QR codes came from, what each part of the square does, how your phone reads it, and what you can put inside one.
Where QR codes came from
The QR code was announced in 1994 by DENSO WAVE, then part of the Japanese car-parts maker DENSO. A tiny team led by Masahiro Hara built it in about a year and a half (DENSO WAVE history).
The goal was simple: ordinary barcodes could hold only about 20 characters, and factories needed more data — including Japanese characters — read fast. That is where the name comes from: "QR" was chosen to suggest quick response (DENSO WAVE FAQ).
One decision made QR codes spread everywhere: DENSO WAVE kept the patent but said it would not enforce it, and published the specification so anyone could use it for free (DENSO WAVE history). You still don't need a licence or pay a fee to make or use QR codes, even for business (DENSO WAVE FAQ).
What the parts of a QR code do
Look closely at any QR code and you'll see the same building blocks (Keyence QR basics):
- Modules. The small black and white squares. Each one is a single "dot" of data.
- Three big corner squares (finder patterns). They tell the camera "a code is here" and which way up it is. Their black-white-black stripes follow a 1:1:3:1:1 ratio, which the inventors picked because it almost never appears in normal printed pages (DENSO WAVE history). That's why you can scan a code upside down or at an angle.
- Timing patterns. Two thin dotted lines between the corner squares that help the reader count rows and columns.
- Alignment pattern. A smaller square near one corner (on bigger codes) that corrects for a bent or tilted surface.
- Format information. A few modules next to the corners that say how the rest is packed. The reader looks at these first.
- Quiet zone. The empty white border around the code. It needs to be at least four modules wide so the camera can see where the code ends.
How your phone reads a QR code
In the second between pointing your camera and seeing a link, the phone does roughly this:
- Finds the three corner squares and works out the code's position, size and angle.
- Reads the grid. Using the timing lines, it maps every module as dark or light.
- Reads the format information to learn the error-correction level and the "mask" — a pattern used when the code was made so it doesn't contain confusing shapes.
- Fixes damage. Using error correction (Reed-Solomon codes), it rebuilds bits that are smudged or missing.
- Turns the data into text — a web address, a Wi-Fi login, a phone number — and shows you a preview to tap.
No internet is needed for any of this. You only need a connection if the text inside is a website you want to open.
Why a scratched code still works: error correction
QR codes carry extra backup data, so a damaged code can still be read. There are four levels (Keyence QR basics):
| Level | Share of the code that can be damaged |
|---|---|
| L | about 7% |
| M | about 15% |
| Q | about 25% |
| H | about 30% |
A higher level makes the code more robust but also denser, because the backup data takes space. Don't rely on it too much, though: DENSO WAVE warns that design changes such as overlays can go beyond what error correction can fix (DENSO WAVE FAQ). Always test a designed code with a few phones before you print.
How much can a QR code hold?
Sizes go from version 1 (21 × 21 modules) to version 40 (177 × 177 modules); each version adds 4 modules per side (Keyence QR basics). The biggest code can hold up to 7,089 digits, 4,296 letters and numbers, or 2,953 bytes of other data.
In real life, phones are happiest with much less. DENSO WAVE suggests about 271 bytes for comfortable phone reading, though it depends on the device (DENSO WAVE FAQ). That's why most QR codes hold a short web link rather than a long text: the shorter the content, the fewer and bigger the squares, and the easier the scan.
QR code vs. normal barcode
| Normal barcode | QR code | |
|---|---|---|
| Shape | Lines, read in one direction | Square grid, read in two directions |
| Typical content | A product number | A link, text, Wi-Fi login, contact card and more |
| Reading angle | Must line up with the scanner | Any angle, even upside down |
| Damage | A torn line often stops it | Error correction rebuilds missing parts |
Static and dynamic QR codes
A static code stores your content directly in the squares. It never expires and needs no service in the middle. A dynamic code stores a short link that points to your content, so you can change where it goes later and count scans. Read do QR codes expire? for when each one makes sense.
Make your own QR code
Now that you know what's inside, making a good one is easy: keep the content short, use dark squares on a light background, leave the white border, and test before printing. You can make one for free on QR Hub, with no sign-up.
New to scanning? See how to scan a QR code on any phone without an app.
Quick answers
What does QR stand for? "Quick response". The official name is simply "QR Code".
Who owns the QR code? DENSO WAVE invented it and holds the "QR Code" trademark, but anyone can make and use QR codes for free.
Can a QR code be used without the internet? Yes. Reading a code needs no connection. Only opening a website from it does.
Can a QR code contain a virus? The code itself is just text. The risk is the website it opens, so check the address in the preview before you tap.
QR Code is a registered trademark of DENSO WAVE INCORPORATED.
Make your QR code now
Free static QR codes with no sign-up and no expiry. Editable codes with scan stats when you need them.
Make this QR now