Skip to the tool workspace
Browser 123

How-to QR codes

How to make a QR code that scans every time

Size, contrast, a clear margin and a test before you print: the four things that decide whether a QR code scans, and how to check them.

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.

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

The direct wayqrencodeLinux · macOS · Windows (WSL)

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
Before you print a batch
  1. Make the code with the shortest content that does the job.
  2. Check it scans: the editor's badge, or zbarimg on the command line.
  3. Print one copy at the real size, on the real paper or material.
  4. Scan it with two different phones, from the distance people will stand.
  5. Only then print the rest.

Questions people ask

What is the smallest a QR code can be printed?

It depends on how much it holds and how far away people stand. A rule of thumb is that a phone scans from about ten times the code's width, so a 2 cm code works from about 20 cm. Less content means fewer, larger modules at the same size.

Why does my QR code not scan?

Usually one of four things: too little contrast, no clear margin around it, printed too small for the distance, or too much content for its size. A logo that covers too much is a fifth.

Can a QR code be coloured?

Yes, as long as the code is clearly darker than its background. Dark on light is safest; a light code on a dark background is not read by every scanner.

Do I need a high error correction level?

Only when part of the code will be covered or damaged, such as by a logo or outdoors. Higher levels make a denser code, which needs more space.

Tools in this guide

Everything runs on your device

All guides

/
123 items
Runs in your browser·Your files stay on this device
Out0 B
Ready—