What is a QR code?
What is a QR code?
A QR code is a two-dimensional barcode that stores text in a grid of black and white squares. QR stands for Quick Response. A camera reads the grid and recovers whatever was encoded, most often a web address, which is why scanning one usually opens a page.
Denso Wave, a Toyota subsidiary, designed it in 1994 for tracking car parts, and published it as an open standard, ISO/IEC 18004. That is why nobody charges a licence fee to make one, and why the format outlived the factory it was built for.
How it differs from an ordinary barcode
A traditional barcode is one-dimensional. It encodes data in the widths of vertical bars, and a scanner reads it along a single line, which is why the laser sweeps across it. A QR code is a matrix: data runs in two directions at once, so the same patch of paper carries far more. A barcode typically holds a dozen or so digits, a QR code up to a few thousand characters.
The parts that are not data
Not every square in a QR code is information. Several regions exist purely so the camera can read the rest:
- Three finder patterns, the large squares in the corners. The camera locates these first, and their arrangement tells it the size, position and rotation of the code. Three rather than four is deliberate: the missing corner is how it works out which way up you are.
- Timing patterns, the alternating line between two finders, which tells the camera how wide one module is.
- The quiet zone, four modules of blank space all the way round. It is not decoration, and cropping it is the commonest reason a code that looks fine will not scan. Our troubleshooting guide starts there for a reason.
Why it survives damage
QR codes carry Reed-Solomon error correction, the same family of maths that lets a scratched CD play. At the four available levels, between roughly 7 and 30 percent of the symbol can be unreadable and the data still recovers intact.
That redundancy is what makes a logo in the middle possible, and it is also a budget you can overspend. Put a logo on a code at the lowest correction level and you have eaten the margin that was absorbing print smudges and bad light.
Two kinds, and only one is about the pattern
The most consequential distinction is not visible in the symbol at all. A staticcode encodes your destination directly, so changing where it goes means reprinting. Adynamic code encodes a short link that redirects, so the destination can move without touching anything already printed.
They look identical. The difference only shows up the day the page behind it moves, which is covered in dynamic versus static.
Questions
The things people ask before they commit something to paper.
What does QR stand for?
Quick Response. Denso Wave designed it in 1994 to track car parts on a production line, where a barcode scanner had to read a label fast and from an awkward angle. The name describes the design goal rather than anything about the pattern.
What type of barcode is a QR code?
A two-dimensional, or matrix, barcode. A traditional barcode is one-dimensional: it encodes data in the widths of vertical bars and is read across a single line. A QR code uses a grid, so it carries data in two directions at once and holds far more in the same footprint.
How much can a QR code hold?
Up to about 4,296 alphanumeric characters at the largest version and lowest error correction, but that is a specification limit rather than a practical one. More data means more modules in the same square, so each module gets smaller and the code has to be printed larger to stay readable.
Why does a QR code still scan when part of it is damaged?
Reed-Solomon error correction, the same family of maths that lets a scratched CD play. Depending on the level chosen, between 7 and 30 percent of the symbol can be unreadable and the original data still recovers. It is why a logo can sit on top of one, within limits.
Do QR codes work in any orientation?
Yes. The three large squares in the corners are finder patterns, and a camera uses them to work out where the code is, how big it is and which way up. That is why you can scan one upside down without thinking about it.