A short history
QR stands for “Quick Response”. The format was created in 1994 by Denso Wave, a Japanese company in the Toyota group, to track car parts in factories. It needed to be read quickly and from any angle, and to hold more than a one-line barcode. Denso Wave chose not to charge for using the format, and it later became an international standard, ISO/IEC 18004. That openness is why every phone camera can read a QR code today without a special app.
The parts of a QR code
A QR code is a grid of small squares called modules. Each module is either dark or light, and stands for a bit of data or a bit of structure. Some parts are always in the same place:
- Finder patterns: the three big squares in the corners. A scanner looks for these first. Because there are three and not four, it can tell which way up the code is, so a QR code scans at any rotation.
- Alignment patterns: smaller squares, usually near the bottom right. They help the scanner correct for a code that is printed on a curve or photographed at an angle. Larger codes have several.
- Timing patterns: a dotted line of alternating modules between the finder patterns. They tell the scanner how big each module is.
- Format information: a strip next to the finder patterns that records the error correction level and the mask used (more on both below). It is stored twice so that one damaged copy doesn’t matter.
- Quiet zone: the empty margin around the code. The standard asks for four modules on every side. Without it, a scanner can confuse the code with whatever is printed next to it.
Everything else is your data, plus extra error correction data.
Versions: why some codes are denser than others
QR codes come in 40 sizes, called versions. Version 1 is 21 × 21 modules. Each version after that adds 4 modules to each side, up to version 40 at 177 × 177. The generator picks the smallest version that fits your content.
This is why a short link makes a code with big, chunky squares and a long link makes a fine, busy pattern. If you print both at 2 cm wide, the modules in the long one are much smaller, so the phone has to be closer and the print has to be sharper. Shortening the content is the single most effective way to make a code easier to scan.
How much can a QR code hold?
The largest code, version 40 with the lowest error correction, can hold up to 7,089 digits, 4,296 letters and numbers from the basic alphanumeric set, or 2,953 bytes of any data. Text with accents, non-Latin scripts or emoji uses more than one byte per character, so it fits fewer characters.
In practice you rarely want to go near those limits. A code that full is very dense and hard to read unless it is printed large. For links, a few dozen characters is ideal. For plain text, a few hundred characters is a comfortable maximum.
Error correction: why a logo doesn’t break the code
QR codes use Reed-Solomon error correction, the same family of maths used on CDs and in deep-space radio. Extra data is added so that the scanner can rebuild missing or damaged parts. There are four levels:
- L (low): about 7% of the code can be lost.
- M (medium): about 15%.
- Q (quartile): about 25%.
- H (high): about 30%.
Higher levels let the code survive more damage, but they also take up space, so the same content needs a bigger version. That is the trade-off: level H is the right choice when you put a logo in the middle or expect wear and tear, and level L or M gives the simplest pattern for a clean screen or a small print.
A logo works because it covers modules that the error correction can rebuild. It only works if the logo stays under the limit and doesn’t cover the finder patterns. That is why logo tools keep the logo small and centred.
Masks: why the pattern looks random
Large blocks of the same colour, or patterns that look like a finder square, confuse scanners. So before the code is drawn, the data is combined with one of eight fixed mask patterns. The generator tries all eight and keeps the one that gives the most even mix of dark and light. The scanner reads which mask was used from the format information and undoes it. This is why two codes with almost the same content can look completely different.
What the content looks like inside
A QR code only stores text. Phones decide what to do based on how that text starts:
https://…opens a website.WIFI:T:WPA;S:network;P:password;;offers to join a Wi‑Fi network.BEGIN:VCARDoffers to save a contact.mailto:opens a new email,SMSTO:a text message andtel:a phone call.- Anything else is shown as plain text.
You can see exactly what any code contains with the QR code scanner, which reads an image without opening the link.
Static and dynamic QR codes
Everything above describes a static code, where your content sits in the pattern itself. A dynamic code stores a short link to a provider’s server instead, which redirects to your page. That makes it editable, but it stops working if the service does. Static vs dynamic QR codes compares the two in detail.
Why some QR codes don’t scan
- Too small for the distance: the modules are too tiny for the camera at that range.
- Low contrast: pale colours, or a code printed on a busy photo.
- Inverted colours: light modules on a dark background. Many scanners handle it, but not all.
- No quiet zone: text or graphics pressed right up against the code.
- Too much decoration: a logo that is too big, or a style that changes the shape of the finder patterns too far.
- Glare or curves: glossy lamination, or a code wrapped tightly around a bottle.
The guide on printing a QR code that scans covers how to avoid each of these.