How to print a QR code that scans every time
Most QR codes that fail in the real world fail because of how they were printed, not how they were made. Four things decide it: how big the code is, the empty margin around it, the contrast of the squares, and what the paper or surface does to them. Here is how to get each one right before you print a thousand copies.By QRCraftly · Published · Updated · 4 min read
- Keep a blank margin of at least four squares on every side. Cropping it is the most common mistake.
- Use dark squares on a light background, with strong contrast. Do not invert the colors.
- Print big enough for the distance it will be scanned from, and give a long address more room than a short one.
- Export a vector file (SVG or PDF) for print, and test a proof with more than one phone before the full run.
Phones need to see each square as several pixels wide, so the right size depends on how far away the camera is and how many squares the code has. A code with a short address has fewer, larger squares and can be printed smaller. A long address needs more squares, so the same printed width makes each square smaller.
| Where it will be scanned | Typical distance | Start with a code at least |
|---|---|---|
| Business card, ticket, product label | Hand held, 10 to 30 cm | 2 cm wide |
| Menu, flyer, poster at a counter | Arm’s length, up to 60 cm | 3 to 4 cm wide |
| Shop window, signage, shelf | 1 to 2 m | 8 to 15 cm wide |
| Billboard, vehicle, banner | Several meters | Roughly one tenth of the distance |
These are starting points, not guarantees, and a rough rule of thumb is a code about one tenth as wide as the scanning distance. Shorten the address if you need a smaller code: a short, plain address makes a simpler code than a long one with tracking parameters on the end. The QR code size calculator measures the code your own content makes and gives the width for any distance, in centimetres and inches.
The standard asks for a blank border, called the quiet zone, four squares wide on every side. It is how a reader finds where the code starts. Designers crop it because it looks like wasted space, and then the code scans only sometimes. If your code sits on a colored panel or an image, the margin must be a plain light area, not a busy photo. If you are unsure whether a design leaves enough room, check a photo of it with the QR code checker.
Dark squares on a light background is the arrangement every reader supports. Light squares on a dark background (an inverted code) work in some apps and fail in others, so avoid it for anything public. Color is fine as long as the dark color is much darker than the light one. Yellow on white, pale gray on white and red on black are common ways to lose it. Printing can reduce contrast further, because ink spreads and paper is never as white as a screen.
- Matte paper scans better than glossy, which throws glare back at the camera.
- Curved surfaces such as bottles and mugs distort the squares. Print larger and keep the code on the flattest part.
- Embossed, engraved or textured finishes break up the squares. Test a sample of the real material.
- Folds, creases and seams through the code damage it. Keep the code clear of them.
- Keep the code away from edges that will be trimmed, and allow for the cutter’s tolerance.
A QR code is a grid of squares, so it stays sharp at any size only as a vector file. Export SVG or PDF for anything printed, and send the printer that file, not a screenshot. If you must use PNG, export it large and at a size where each square is a whole number of pixels, so the edges stay crisp. Do not let a layout tool smooth or resample the image.
- Scan the final artwork on screen with two different phones.
- Print one proof on the real material at the real size and scan it from the real distance.
- Check it in poor light and at a slight angle.
- Write the address next to the code as plain text, so a person can type it if the code fails.
- Keep the file you printed from. A static code cannot be regenerated differently by accident, but you will want the original.
Still unsure about a design? Drop a photo of the proof on the QR code checker. If your code carries a logo, read error correction explained first, because a logo uses up some of the code’s safety margin.
- Denso Wave (the inventor of QR Code), “Standardization”, qrcode.comQR Code is specified by ISO/IEC 18004, which also defines the quiet zone.
- ISO/IEC 18004:2015, “Information technology — Automatic identification and data capture techniques — QR Code bar code symbology specification”The specification of the symbol, including its quiet zone and contrast requirements.