QR codes that actually scan

Development · 6 min read

A QR code that looks fine on screen but fails to scan on a poster or a business card is a common and entirely avoidable problem. Most scanning failures come down to a handful of predictable mistakes involving contrast, size, spacing, and print quality, all of which are easy to fix once you know what to check.

Error correction: your safety margin

QR codes include built-in error correction, meaning a scanner can still read the code correctly even if part of it is damaged, dirty, or obscured. There are four levels, L, M, Q, and H, offering roughly 7%, 15%, 25%, and 30% redundancy respectively.

Higher error correction makes the code denser and more visually complex for the same amount of data, which can actually hurt scannability at small sizes because the individual modules (the little black squares) become harder to resolve.

For most everyday uses, like linking to a website or Wi-Fi details, level M or Q is a sensible default. Reserve level H for codes that will be printed small, placed somewhere they might get scuffed or partially covered, such as on packaging or outdoor signage.

The quiet zone matters more than people think

The quiet zone is the blank margin of empty space surrounding the QR code itself, and scanners rely on it to detect where the code starts and stops. The standard recommends a quiet zone at least four modules wide on every side.

Cropping a QR code tightly, placing it flush against a busy background, or butting text right up against its edge is one of the single most common causes of scan failures, even when the code itself is perfectly generated.

When exporting or placing a QR code, always leave visible white space around it, and treat that margin as part of the code, not as wasted design real estate you can trim away.

Contrast is non-negotiable

QR scanners rely on a clear light-dark contrast to distinguish the modules from the background. Dark modules on a light background is the safest, most reliable combination, and it is what almost every scanner is optimised to detect.

Light-on-dark ('inverted') QR codes can work with some modern scanners but fail with older or less capable ones, so they are a genuine risk unless you have tested extensively across devices. Low-contrast colour pairings, like a mid-grey code on a slightly lighter grey background, are even riskier and best avoided entirely.

If you want a branded or coloured QR code, keep the darkest colour genuinely dark and the background genuinely light rather than relying on hue alone to create contrast, since many scanners process the image in greyscale before reading it.

Sizing for the scanning distance

A QR code needs to be large enough, relative to the distance someone will be standing when they scan it, for a phone camera to resolve the individual modules clearly. As a rough guide, the code's minimum size in centimetres should be about one-tenth of the intended scanning distance.

A code meant to be scanned from arm's length, roughly 30cm away, should be at least 3cm square, while a code on a poster meant to be scanned from two metres away needs to be at least 20cm square to scan reliably.

Denser codes, meaning ones carrying more data or using higher error correction, need to be printed larger than simple ones to remain scannable at the same distance, since there are more, smaller modules packed into the same physical space.

Keep the encoded content short

The amount of data you encode directly affects how dense and visually complex the resulting QR code is. A short URL produces a simple, easy-to-scan pattern, while a long string of raw text or an unshortened tracking URL with many parameters produces a dense, hard-to-scan grid.

Where possible, use a short link rather than a long one, and strip unnecessary tracking parameters if you can add them back through a redirect service instead. A qr-code generator that shows you a live preview as you type is a useful way to see this trade-off happening in real time.

Print quality and material considerations

Printing at too low a resolution can blur the fine edges of small modules together, so aim for at least 300 DPI for anything printed, and check a physical proof before mass-producing signage, packaging, or business cards.

Glossy or reflective materials can cause glare under certain lighting, which confuses camera autofocus and exposure. If you are printing on a reflective surface, test scanning under the actual lighting conditions the code will be viewed in, not just under office lighting.

Avoid stretching a QR code non-uniformly (squashing it into a rectangle to fit a layout), since this distorts the module shapes and can prevent scanners from recognising the pattern correctly.

Always test before you commit

Test any QR code intended for print or wide distribution with several different phones and scanning apps, not just your own device, since camera quality and scanning software both vary meaningfully between manufacturers.

Test at the actual intended size and distance where possible, ideally by printing a proof rather than only checking it on a screen, since screen glare, resolution, and scale behave differently to paper.

Logos and design overlays

Adding a small logo to the centre of a QR code is generally safe if you are using a higher error correction level, since the redundant data can compensate for the obscured area. Keep the logo small, well under a fifth of the code's total area, and never place decorative elements over the three large corner squares, which scanners use to orient the code.

Common questions

Why does my QR code work on my phone but not on others?
This usually points to a marginal issue, like low contrast, a cropped quiet zone, or a code printed too small for the scanning distance, that your phone's camera and scanning software happen to compensate for while others do not. Test across multiple phones and apps before finalising any code for print or public use.
What error correction level should I use by default?
Level M (around 15% redundancy) is a solid default for most everyday uses like links or contact details, balancing resilience against damage with a reasonably simple, scannable pattern. Reserve the higher H level for codes that will be small, outdoors, or at risk of partial damage or dirt.
Can I make a QR code any colour I like?
You can, but reliability depends on contrast, not colour itself. Keep the foreground genuinely dark and the background genuinely light, avoid light-on-dark unless you have tested it thoroughly, and steer clear of colour pairs that look different in colour but similar in brightness once converted to greyscale.
How small can a QR code safely be printed?
There is no single fixed minimum, since it depends on the amount of encoded data and the scanning distance, but as a rough floor, avoid printing any QR code smaller than about 2cm square, and always scale up further for codes with denser content or intended for scanning from further away.
Does adding a logo hurt scannability?
A small, centred logo is usually fine as long as you use a higher error correction level to compensate for the covered area, keep the logo modest in size, and avoid covering the three large square markers in the corners, which scanners rely on to detect the code's position and orientation.

Tools for this

Keep reading