A QR code is a two-dimensional barcode that writes information into a pattern of black and white squares. Its name comes from “Quick Response”: a phone's camera reads it in less than a second.
A short history
The QR code was developed in Japan in 1994 to track car parts on the production line. The aim was a code that holds far more information than a striped barcode and reads quickly from any angle. It became an international standard (ISO/IEC 18004) and stayed open for anyone to use.
It really spread around 2017, when phones' own camera apps started reading codes without a separate app. Today it is everywhere, from menus and payments to packaging and tickets.
QR Code is a registered trademark of DENSO WAVE.
The parts of the pattern
- Position markers: The large squares in three corners. The phone finds the code with them and works out the angle it is looking from.
- Alignment marker: A small square in bigger codes that helps reading on a tilted or curved surface.
- Timing lines: Dotted lines between the position markers that measure the size of the modules.
- Data modules: The information itself and the error correction data that protects it.
- Quiet zone: An empty margin around the code, at least four modules wide. Without it the camera cannot tell where the code ends.
How much can it hold?
The most a QR code can hold depends on the kind of characters it carries:
| Content | At most |
|---|---|
| Digits only | 7,089 characters |
| Digits and capital letters | 4,296 characters |
| Any text (bytes) | 2,953 bytes |
These figures are for the largest code (177 × 177 modules) with the lowest error correction. The more information, the denser the pattern and the harder it is to read when printed small. That is why a short link works best in practice; it keeps dynamic codes' patterns sparse.
How does the phone read it?
The camera first finds the three position markers, corrects the angle and tilt, then reads the modules one by one. It fills in missing or dirty parts with the error correction data. Then it works out what the content is and offers something: opening an address, joining a network or saving a contact.
The phone shows the address before opening it; reading it is a good habit. We explain why in fake QR codes.
Error correction
A QR code can recover its information even if part of its pattern cannot be read. There are four levels: L (about 7%), M (15%), Q (25%) and H (30%). The higher the level, the more damage the code withstands, but the denser its pattern. That is why codes with a logo use the highest level; details in QR code with a logo.
Static and dynamic QR
In a static code the information is inside the pattern and does not change. In a dynamic code the pattern carries a short link; where the link goes can be changed later and scans can be counted. We explain which to choose when in static vs dynamic QR codes.
You can create codes with 24 QR types, from a website or a menu to Wi-Fi or a PDF. Static codes are free on every plan.