A QR code that does not scan costs you every person who tried. Four things decide whether it reads, and all four can be checked before you print.
The four things that matter
| What | Why | Aim for |
|---|---|---|
| Contrast | The camera has to tell dark modules from light ones | Dark on light, at least 4:1 |
| Quiet zone | The reader finds the code by its clear margin | 4 modules for QR, 2 for Micro QR and rMQR |
| Size | Each module must cover enough pixels in the camera | About a tenth of the scanning distance |
| Content | More content means more, smaller modules | Short links, only the fields you need |
Keep it short
The code grows with what you put in it. A long tracking link makes a dense code that needs to be printed large; the same page on a short link makes a code with big, easy modules. The same goes for contact cards: every field you leave out makes the code smaller.
Give it a margin
The quiet zone is the empty border around the code. It is part of the code: readers use it to find where the code starts. Do not let text, a photo or the edge of a card run into it.
Print it big enough
A phone scans from about ten times the code's width, as a rule of thumb: a 3 cm code from about 30 cm, a 30 cm poster code from about 3 metres. A code on a window across the street needs to be much bigger than one on a table.
On the command line
qrencode makes plain QR codes. This one is 10 pixels per module with the
standard 4-module margin, at error correction level M:
qrencode -o menu.png -s 10 -m 4 -l M "https://example.com/menu"
For print, make an SVG instead, which scales without blurring:
qrencode -t SVG -o menu.svg -m 4 -l M "https://example.com/menu"
zbarimg from the zbar tools reads it back, which is a quick test that the file
holds what you meant:
zbarimg --raw menu.png
- Make the code with the shortest content that does the job.
- Check it scans: the editor's badge, or
zbarimgon the command line. - Print one copy at the real size, on the real paper or material.
- Scan it with two different phones, from the distance people will stand.
- Only then print the rest.