Guide
What is a QR code?
A two-dimensional barcode invented to track car parts, now used for everything from restaurant menus to payment systems used by hundreds of millions of people daily.
A QR code is a two-dimensional barcode that stores data in a square grid of black and white modules. It was invented in 1994 by Masahiro Hara at Denso Wave, a Toyota subsidiary, to track car parts faster than linear barcodes allowed. It can hold up to 2,953 bytes and can be read from any angle.
Invented to solve a factory problem
In 1994, Denso Wave — part of the Toyota group — needed to track components through manufacturing faster than linear barcodes allowed. A one-dimensional barcode stores about 20 characters and has to be scanned in roughly the right orientation. Operators were scanning ten barcodes per box.
Masahiro Hara's team designed a two-dimensional code that could hold far more and be read at any rotation. The three corner squares — the finder patterns — are the key innovation. Their ratio of dark and light bands, 1:1:3:1:1, is a sequence deliberately chosen to be rare in printed material, so a scanner can locate them almost instantly regardless of orientation. The story that the ratio was chosen after analysing printed matter for the least common pattern is one Hara has told in interviews, and it explains why the codes read so quickly.
Denso Wave holds patents on the technology but chose not to enforce them, publishing the specification openly. That decision is the reason QR codes are everywhere and competing 2D formats are not.
What the square is made of
Every code contains structural elements that carry no user data at all:
- Finder patterns — the three large squares at the corners, used to locate and orient the code.
- Alignment patterns — smaller squares that correct for perspective distortion when the code is photographed at an angle. Version 1 has none; larger versions have many.
- Timing patterns — alternating dark and light modules running between the finders, which tell the decoder the module size.
- Format information — a band next to the finders storing the error correction level and mask pattern.
- Quiet zone — four modules of empty space around the whole code. Not decoration; the decoder needs it to find the boundary.
- Data and error correction — everything else, interleaved so that damage in one area can be reconstructed.
What a code can hold
| Mode | Maximum characters | Typical use |
|---|---|---|
| Numeric (0–9) | 7,089 | Serial numbers, references |
| Alphanumeric (0–9, A–Z, some symbols) | 4,296 | Uppercase codes, short URLs |
| Byte / UTF-8 | 2,953 | URLs, text, Wi-Fi, contacts |
| Kanji | 1,817 | Japanese text |
Those are absolute maxima at error correction level L in version 40, the largest code — a 177 × 177 grid that is impractical to print small. Real-world codes hold far less: a typical URL code holds 25–60 characters and produces a version 2 to 4 grid.
The variants you will rarely need
Two variants exist alongside the standard format. Micro QR codes have a single finder pattern and hold up to 35 numeric characters — used on very small components. rMQR is a rectangular variant designed for narrow spaces such as cable labels and pharmaceutical strips.
Neither is well supported by phone cameras. Unless you are working in industrial identification with dedicated scanners, use the standard format.
Frequently asked
Who invented the QR code?
How much data can a QR code hold in practice?
Are QR codes free to use?
What does QR stand for?
Last reviewed 24 August 2026 · Written and reviewed by the QR Code Builder team