Why QR codes fail to scan

Four causes account for almost every failure. Here is how to work out which one you have, and what actually fixes it.

On this page: Diagnose it in 60 seconds · 1. Contrast · 2. Margin · 3. Density · 4. Logo coverage · Less common causes

When a QR code will not scan, most people assume the code is broken. It almost never is. The pattern itself is either correct or it is not, and a generator either produced valid data or it did not — there is very little middle ground. What fails in the real world is the presentation: how the code was coloured, cropped, sized or printed.

That is good news, because presentation problems are all fixable, and they fall into four categories. Everything else is rare enough to treat as an exception.

Diagnose it in 60 seconds

Before changing anything, run this test. It separates a problem with the code from a problem with the physical object.

  1. Open the digital file and scan it off the screen. Use the original PNG, not a photo of the printed version. If this works, your code data is fine and the problem is printing, sizing or surface.
  2. If the digital version also fails, the payload is probably the issue — the content is too long, or the colours are too low in contrast. Regenerate it with the default black-on-white settings to confirm.
  3. Test with a second device. One phone's camera app can be unusually fussy. Two failures is a real problem; one is inconclusive.

Now work through the four causes in order. They are listed from most common to least.

Cause 1: not enough contrast

This is the single most common failure, and it is the one designers walk into deliberately because low-contrast colours photograph well.

A QR scanner does not read colour. It converts the image to a grid of light and dark, using a threshold to decide whether each module is a one or a zero. If your code colour and background colour are close in luminance — how bright they are, not which hue they are — that threshold lands in a grey no-man's-land and modules get misread as their neighbours.

The trap is that hue and luminance are not the same thing. Dark navy on cobalt blue looks like a dramatic, high-contrast pairing to a human eye, but both are dark, so the luminance gap is small. Conversely, magenta on yellow looks garish and has an enormous luminance gap, which is why it scans beautifully.

How to fix it

  • Aim for a luminance contrast ratio of at least 5:1. QRMint measures this live as you choose colours and warns you below 3:1.
  • Keep the code dark and the background light. Dark-on-light is the arrangement the standard assumes and every scanner handles.
  • Be careful with inverted codes. Light code on a dark background looks striking and does work on most modern phones, but many older scanners and some industrial readers cannot resolve it. If you invert, test on the oldest device you expect to encounter.
  • Watch gradients. A gradient is fine as long as both stops stay clearly darker than the background — but the lightest stop lands near the corners, which is exactly where two of the three finder patterns sit. That is why QRMint measures the gradient at its midpoint and both ends, and deepens a stop that would put the corner squares at risk.
  • Do not rely on gloss. A high-contrast code under a spotlight on glossy laminate can still fail, because the reflection blows out the local contrast.
A quick field test: convert your design to greyscale. If the code and the background are hard to tell apart in greyscale, a scanner will struggle too.

Cause 2: no quiet zone

Every QR code needs a border of blank space around it. The standard calls this the quiet zone and specifies a minimum of four modules — four of the small squares — on every side, with no exceptions.

The quiet zone is not decoration. A scanner needs it to find where the code begins. Without clear space, it cannot distinguish the edge of the symbol from whatever is next to it: the edge of a business card, a border line, a background photograph, or another element of the layout.

This cause is more common than people expect, and it is almost always introduced by a designer rather than a generator. Generators add the margin; then the artwork gets placed in a layout and the margin gets cropped away to make the code fit a space.

How to fix it

  • Check the final artwork, not the downloaded file. Zoom in at the actual print resolution. This is where the margin disappears.
  • Count modules if you are unsure. Take one module's width — the size of a single small square — and confirm there are at least four of them of clear space on each side.
  • If space is tight, do not shrink the margin — shrink the code. A slightly smaller code with an intact quiet zone beats a larger one without it.
  • Do not let anything else into the quiet zone. A caption, a border, a caption line or a logo in the margin is as bad as no margin.

Cause 3: too much data for the print size

A QR code is a grid of fixed capacity. To carry more characters, the grid must have more modules. At any given physical size, more modules means each module is smaller — and once a module gets small enough that the camera cannot resolve it as a distinct square, the code stops reading.

This is why a short link works beautifully at 2 cm on a business card while a long URL with tracking parameters fails at the same size. The physical size is identical; the module size is not.

It is also why the same code can fail in print but succeed on a phone screen. On a screen you can fill the display with the code and the modules stay large; printed at card scale they might be half a millimetre wide.

How to fix it

  • Reduce the payload. Shorten the URL, strip tracking parameters, remove optional fields from a contact card. Every character you delete increases the module size at a fixed print size.
  • Print bigger. The reliable rule is that the code's width should be at least one tenth of the scanning distance. See the size and print guide for a table of real placements.
  • Watch the version number. Most generators expose it, and QRMint shows it in the preview panel. Under version 10 is comfortable for small print; beyond about version 20, you need a noticeably larger area.
  • Use the highest practical resolution for digital use. For screen display, export at 1024 px or more so the modules stay crisp when scaled.

QR codes have built-in redundancy called error correction. Data is stored with enough mathematical padding that part of the symbol can be destroyed and the content reconstructed. There are four levels, recovering roughly 7%, 15%, 25% and 30% of the symbol.

A logo placed in the middle of the code destroys modules. That is fine — that is exactly what error correction is for — but only up to the limit of the level you chose. A logo covering 20% of a symbol set to level M (15% recovery) leaves the scanner trying to reconstruct more damage than the data can support, and it will fail. It often fails intermittently, working on a clean screen and failing on a slightly angled phone, which makes this cause especially frustrating to diagnose.

There is a second, subtler failure mode: damaging the finder patterns. Those are the three large square targets in the corners, and they carry no error-correction redundancy at all. They are pure geometry. A logo centred in a small, dense code can encroach on them, and that breaks scanning outright regardless of your error-correction level.

How to fix it

  • Always use level H when embedding a logo. It recovers about 30%, which is the largest budget available. QRMint raises the level automatically when you add a logo.
  • Keep the logo under about a quarter of the code's area. That means roughly 22% of the code's width, since area scales with the square of width.
  • Never let the logo touch the corner squares. Use a centre placement with generous clearance, and check the densest code you plan to print.
  • Put a solid plate behind the logo. A transparent or busy logo lets the underlying modules show through as visual noise, which makes the scanner's job harder than a clean occlusion would. QRMint adds this plate by default.
  • Use higher error correction than you think you need. Level H also protects against scratches, folds and partial dirt, which is worth having on anything long-lived.

Less common causes

If you have worked through all four and the code still fails, these are the remaining suspects.

SymptomLikely causeWhat to do
Works on a phone, fails on a retail scanner The reader only supports linear barcodes, not QR Not a code problem. Ask the venue what symbologies the reader handles.
Fails in sunlight, works indoors Glare reducing local contrast on a glossy surface Reprint matte, or move the code away from direct light.
Fails on a curved surface Perspective distortion — a bottle or can bends the grid Use a flatter area, or a label with less curvature, and print larger.
Fails on fabric or textured material Uneven ink absorption blurring module edges Use a printed label or a woven patch instead of direct printing.
Works for you, fails for everyone else Your phone cached the destination, or you tested the digital file only Test the printed proof on a device that has never scanned it.
Scans, but opens the wrong thing The payload itself is malformed for its type Regenerate using the matching tool type rather than pasting raw text.

The habit that prevents all of this

Print a single proof before committing to a run. One sheet, on the real material, scanned with two different phones, in the real lighting. It costs almost nothing and catches every one of the four causes above, because all four are properties of the physical object rather than the data.

QRMint does what software can: it measures contrast, checks the margin against the four-module minimum, computes the symbolic density, and caps the logo to your error-correction budget. It blocks the download when something is genuinely unreadable and warns you when something is merely risky. What it cannot do is inspect your printer, your laminate or your lighting — which is why the proof matters.

The one-line summary: keep it dark on light, leave four modules of clear space, print it big enough for its data, and give a logo the highest error correction.

Related reading