How QR codes work
A QR code stores text in a square grid of dark and light modules that a camera can read from any angle. Its built-in error correction lets it survive dirt, damage or even a logo in the middle.
Born in a car factory
The QR code (Quick Response) was invented in 1994 by Masahiro Hara and his team at Denso Wave, a Toyota group company, to track car parts faster than one-dimensional barcodes allowed. Denso Wave holds the patent but chose not to enforce it, so anyone can use the format freely. It became the international standard ISO/IEC 18004 and spread worldwide once phone cameras could read it.
Anatomy of a code
The three large squares in the corners are finder patterns that tell a scanner where the code is and how it is rotated. Dotted timing lines between them set the grid, and from version 2 smaller alignment patterns correct for bent or tilted surfaces. Format information next to the finders stores the error correction level and the mask. The rest of the grid holds the data and error correction codewords.
Versions, capacity and masks
A code comes in 40 versions, from 21 x 21 modules (version 1) up to 177 x 177 (version 40), growing by 4 modules per step. Version 40 at level L holds 2,953 bytes. Before the data is finished, one of eight mask patterns is applied to avoid large blocks and patterns that look like finders; the encoder picks the mask with the lowest penalty score.
Error correction and tips for scanning
Reed-Solomon error correction adds redundancy so a damaged code can be repaired: level L recovers about 7% of the codewords, M about 15%, Q about 25% and H about 30%. That is why a small logo in the center works at level H. For reliable scanning keep a quiet zone of four modules around the code, use a dark code on a light background with strong contrast, print it at least 2 cm wide, and test it with several phones.
Frequently asked questions
Do QR codes expire?
A static QR code like the ones made here never expires: the content is stored in the code itself. Only dynamic codes from paid services, which point to a redirect link, stop working when the service is cancelled.
How much can a QR code hold?
Up to 2,953 bytes in byte mode at error correction level L, which is about 2,900 Latin characters or fewer in scripts that need several bytes per character. Shorter content gives a smaller, easier to scan code.
Can I put a logo in a QR code?
Yes, if the error correction is high enough. A logo covering about 5% of the area in the center is safe at level H, which can recover around 30% of the codewords. Never cover the three finder patterns.
Ready to try it?
Open PictorX in your browser — no install, no credit card required to start.
Open the QR code generator