QR code guide
What a QR code is, which type to choose, how large to print it and why yours does not work. No marketing, with numbers you can check.
What a QR code is
A QR code is a two-dimensional barcode. Data is written as a grid of dark and light squares called modules. Unlike a classic barcode it is read in both directions, so it holds far more — up to several thousand characters.
The three large squares in the corners are finder patterns. A scanner uses them to locate the code and work out its rotation. That is why they need the most care in any design work: a code without recognisable finders is never found at all, even if the data is intact.
Which type to choose
A QR code contains only text. The fact that a phone offers to open a link or join a Wi-Fi network comes from the format of that text. The wrong format means an unreadable string instead of an action.
| I want | Format | What the phone does |
|---|---|---|
| A web link | URL | Offers to open the page |
| A Czech payment | SPD | Opens the banking app prefilled |
| A euro payment | EPC069-12 | The same across the eurozone |
| A Slovak payment | Pay by square | Opens Slovak banking apps |
| Wi-Fi access | WIFI | Offers to join without typing the password |
| A contact card | vCard or MeCard | Offers to save to contacts |
| An event | iCalendar | Offers to save to the calendar |
| A product package code | GS1 Digital Link | Leads to a product page with batch and expiry |
How large to print it
The most common cause of a code that does not work. The rule is simple: one module must be at least 0.4 mm on paper. That gives the minimum size of the whole code.
| Version | Grid | Smallest print | Suitable for |
|---|---|---|---|
| 1 | 21×21 | 12 mm | Short code, label |
| 3 | 29×29 | 15 mm | Short address |
| 4 | 33×33 | 17 mm | Payment without a message |
| 6 | 41×41 | 20 mm | Payment with a message |
| 10 | 57×57 | 27 mm | Contact card |
| 15 | 77×77 | 36 mm | Longer card with an address |
These are values for ideal conditions: good printing, matte paper, decent light, phone within reach. In practice, allow a margin.
- Business card, receipt, invoice — at least 20 mm.
- Flyer, menu — 25 to 30 mm.
- Shop-window poster — at least 100 mm; it is read from a metre or more.
- Billboard — the rule is one tenth of the reading distance. From ten metres, a metre.
Error correction and logos
A QR code carries redundant data, which is how a damaged code still reads. The amount is chosen from four levels.
| Level | Damage tolerated | When to use |
|---|---|---|
| L | 7 % | Clean print, no logo, want a small code |
| M | 15 % | Everyday use |
| Q | 25 % | Packaging, labels, outdoor use |
| H | 30 % | Logo in the middle, risk of scratching |
A higher level means a larger grid for the same content, and therefore a larger print. It is not free.
A logo in the middle
A logo covers part of the data, which is then reconstructed from the error correction. So when you add one, always raise the level to H.
A safe logo area is up to 20 % of the code. Beyond that, no margin is left for actual damage — and a code that works on screen but not on a printed mug is worse than none.
The quiet zone
There must be clear light space four modules wide around the code. Without it, a scanner cannot tell where the code ends.
This is the most overlooked requirement in the whole standard. A designer places the code tight against an edge or on a photo and then wonders why it fails. For a 33-module grid, four modules is about 12 % of the width on each side.
Colours and contrast
A code need not be black and white, but it must be contrasty. In practice: a luminance ratio of at least 4.5 : 1, and 5 : 1 for the finder patterns.
- Dark modules on a light background, never the other way round.
- Yellow, light green and orange are treacherous on white — they look bold but have low luminance contrast.
- A gradient is safe only if its lighter end is contrasty too.
- Inversion works on some scanners and not others. We advise against it for anything printed.
Static or dynamic
A static code carries the data in the image itself. It works forever, independent of any server, and nobody can see who scanned it. The downside: once printed, it cannot be changed.
A dynamic code carries only a short link to a server that redirects to the real destination. The destination can be changed without reprinting, and scans can be counted. The downside: it depends on that server staying up.
Common mistakes
- Printed too small. By far the most common.
- No quiet zone. A code pushed against an edge or onto a photo.
- Low contrast. A brand colour used without checking luminance.
- An oversized logo. Fine on screen, not on paper.
- Glossy surface. Coated paper reflects light and the scanner sees white. Choose matte varnish for packaging.
- A code on a fold. A folded flyer or box edge distorts the grid.
- An untested code. The cheapest mistake with the most expensive consequences.
How to test a code
- Print it at actual size on an ordinary printer.
- Scan it with at least two different phones, ideally one Android and one iPhone.
- Try it from the distance at which it will really be scanned.
- Try it in poorer light, not just by a window.
- Check that exactly the right thing opened — not merely that something loaded.
If the code carries a payment, check the account number and amount in the banking app, not just that the form opened.
What next
If you want to know how to spot a fraudulent code, read QR code security.