On-device AI — professional-grade, fully private.

Documents

Making QR Codes That Actually Scan

Most unscannable QR codes fail for one of five measurable reasons: too small for the distance, no quiet zone, low contrast, too much data, or a logo over the wrong part.

Updated August 29, 20267 min read

A QR code is a strict specification, not a picture, and codes that fail to scan almost always violate one of a handful of measurable rules. Nothing about it is a matter of taste — there is a minimum size for a given scanning distance, a required margin, a required contrast, and a limit on how much of the pattern can be obscured. Get those right and the code works on every phone made in the last decade.

How a code is built

Every QR code is a grid of black and white squares called modules. The three large squares in the corners are finder patterns, which tell a scanner where the code is and which way round it sits. The dotted lines between them are timing patterns that establish the grid spacing. Everything else is data, plus a substantial amount of redundancy.

The grid size grows with the amount of data, in fixed steps called versions: version 1 is 21 × 21 modules, and they run up to 177 × 177. More data means more modules in the same physical space, which means each module is smaller, which means the code needs to be printed larger or scanned closer. That chain is the reason a short URL is not merely tidier than a long one — it is genuinely easier to scan.

What you encodeRoughlyPractical effect
A short URL, 25 charactersVersion 2–3Scans from a distance, tolerates a logo
A long URL with tracking parametersVersion 6–10Needs to be printed noticeably larger
Wi-Fi credentialsVersion 4–6Fine on a table card
A contact card with full detailsVersion 10+Dense — needs size and good print quality
A paragraph of textVersion 15+Usually the wrong tool for the job

Error correction: how much damage it survives

QR codes carry redundant data so they still read when part of the pattern is dirty, torn, curved or covered. There are four levels, and choosing one is a direct trade between robustness and density.

LevelRecoverableUse for
LAbout 7%Clean screens, digital-only, maximum data
MAbout 15%The sensible default for most printing
QAbout 25%Packaging, outdoor use, curved surfaces
HAbout 30%A logo in the middle, or harsh conditions

Higher correction is not free: the redundant data occupies modules, so the same URL at level H produces a denser grid than at level M. The common mistake is choosing H because it sounds safest and then printing the code at the size that suited level M, which makes each module smaller and undoes the benefit. Pick the level for the conditions, then size the code for the level.

Level H is what makes the logo-in-the-middle style possible. If up to 30% of the modules can be lost, a logo covering the centre is recoverable — provided it stays in the centre and does not touch any of the three corner finder patterns. Cover a corner and no amount of error correction helps, because the scanner can no longer locate the code at all.

Size and the ten-to-one rule

The industry convention is simple arithmetic: the code's side length should be at least a tenth of the intended scanning distance. Scanning from two metres away needs a code 20 cm across. Scanning from 30 cm — a table card, a leaflet in the hand — needs about 3 cm. Below roughly 2 × 2 cm, even a close-range code becomes unreliable on cheaper cameras.

Where it appearsScanned fromMinimum size
Business card, table card20–30 cm2–3 cm
Product packaging30 cm2.5–3 cm
Flyer or magazine page30–40 cm3–4 cm
Poster on a wall1–2 m10–20 cm
Shop window2–3 m20–30 cm
Billboard or vehicle livery10 m+1 m or more

Two adjustments to the arithmetic. Add margin if the code is dense — a version 10 code at the minimum size for its distance has very small individual modules, and print registration or a slightly out-of-focus camera will defeat it. And subtract nothing for a screen: a code displayed on a phone for someone else to scan is at close range but is also glossy and reflective, so keep it generous and turn the brightness up.

Create a print-ready code with the error correction and margin set correctly — generated on your device, not our servers.

Generate a QR code

The quiet zone nobody leaves

The specification requires a clear margin of at least four modules on every side — the quiet zone. It is not decoration. The scanner uses that blank border to find the boundary of the code, and without it the pattern blends into whatever surrounds it and detection fails or becomes intermittent.

This is the single most common failure in real-world design work, because a designer places the code neatly against a coloured panel, a photograph or a line of text, and it looks better that way. Four modules is roughly 10% of the code's width, so on a 3 cm code that is about 3 mm of clear space on all four sides. Generators usually include it in the exported image; cropping the export tightly to save space removes it again.

Printing and material problems

  • Ink spread. On absorbent stock, printed black modules grow slightly and can bridge to their neighbours. Print a proof on the real material rather than on office paper.
  • Glossy laminate. Reflections from overhead lighting wash out part of the code. Matt finishes scan considerably more reliably.
  • Curved surfaces. Bottles, cups and tubes distort the grid. Use level Q or H, keep the code small relative to the curve, and test on the actual object.
  • Vector, not raster. Export the code as SVG or PDF for print where you can. A JPEG of a QR code carries compression artefacts on exactly the hard black-and-white edges the scanner is measuring.
  • Never resize a raster code by dragging. Non-integer scaling makes some modules a pixel wider than others, which is visible to a scanner even when it is not to you. Regenerate at the size you need.

Before anything goes to print in quantity, decode the final artwork rather than the original export. The QR reader reads a code out of an image file. To check a print PDF, turn the page into an image with PDF to image first, then decode that — the artefact that will actually be printed — rather than the file you generated an hour and several design steps ago.

Static codes, dynamic codes and what you are agreeing to

A QR code encodes text and nothing else. When it contains a URL, that URL is fixed forever — printed on ten thousand leaflets, it cannot be changed. This is what dynamic QR services solve: they encode a link to their own domain, which redirects to your real destination, so you can change the target later and count the scans.

The trade is worth stating plainly. Your printed material now depends on a third party's domain continuing to exist and continuing to redirect, and every scan passes through their analytics. If that service shuts down or changes its pricing, every code you have printed becomes a dead link. A static code pointing at a URL you control has none of those risks, and you can still get analytics by pointing it at a page on your own site that redirects.

One note on generation. A QR code frequently encodes something private — a Wi-Fi password, a personal contact card, a private link — and most online generators create the code on their server, which means they have seen it. The generator here builds the code entirely on your device, so the contents are never sent to our servers, and the reader likewise decodes images locally rather than uploading them.

Frequently asked questions

Why is my QR code not scanning?

The usual causes, in order of frequency: no quiet zone, because the code was cropped tight or placed against a busy background; too small for the distance it is being scanned from; too much data, making the modules tiny; low contrast or inverted colours; or a logo overlapping one of the three corner finder patterns.

What size should a QR code be?

At least a tenth of the scanning distance. A code scanned from 30 cm needs to be about 3 cm across; one on a poster read from two metres needs 20 cm. Never go below about 2 cm regardless of distance, and add margin if the code carries a long URL, since denser codes need larger modules.

Which error correction level should I use?

Level M for most printing, which recovers from about 15% damage. Move up to Q for packaging, curved surfaces and outdoor use, and to H if you want a logo in the centre. Remember that higher levels add data and make the grid denser, so size the code up to match.

Can I put a logo in the middle of a QR code?

Yes, at error correction level H, provided the logo stays near the centre, covers no more than about a fifth of the area, and never touches the three corner finder patterns. Those corners are how a scanner locates the code, and no amount of error correction compensates for losing one.

Keep reading

More in Documents →