Skip to content
Creative Studio, runs on our GPU

Utilities · 6 min read

QR code not scanning: six causes and how to fix each one

A QR code that will not scan fails in one of two places: the camera cannot read the pattern, or it reads it and the content is wrong. This guide shows how to tell which, with read rates I measured on 536 real photos, and the fix for each cause.

Saad Naeem

AI engineer, Doha · Updated

First, find out where it fails

A QR code that will not scan has failed at one of two points. Either the camera cannot find and decode the pattern, or it decodes it and what is inside does not work: a dead link, a wrong Wi-Fi password. The fix is different for each, so start by telling them apart.

Take a clear, straight photo or screenshot of the code and open it in Scan QR Code from Image. It reads the picture on your device and shows the text inside the code. If the text appears, the pattern is fine and the problem is the content (reason 6 below). If nothing is found even in a sharp, well-lit photo, the problem is in the pattern itself: reasons 1 to 4. If a good photo reads but the phone camera on the spot does not, look at reason 5.

I measured the decoder this site uses, zxing-wasm, on 536 real photos of QR codes from BoofCV’s public test set, sorted by what was wrong with each photo. Those figures come up below, because they show which problems matter most.

Condition in the photo (BoofCV set) Codes read
Close and straight 100% of 40
Photographed off a computer screen 100% of 17
Turned at any angle, but flat 98.5% of 133
In shadow 95% of 20
Ordinary photos of codes 92.3% of 78
Seen at a steep angle 62.9% of 35
Under glare 58.5% of 53
On a curved surface 56.7% of 60
Blurred 55.4% of 65
Damaged 30.2% of 43
Spots of bright light on the code 25.8% of 97

1. There is no blank margin around it

A scanner finds a QR code by its three corner squares, and it needs a band of empty space around the pattern to see where the code ends. The QR code standard, ISO/IEC 18004, asks for a quiet zone four modules wide on every side (a module is one of the small squares). Denso Wave, the company that created the QR code, puts it simply: “A margin is required around a QR Code.”

This is the most common design mistake. Someone crops the code tight to fit a layout, or prints it on a patterned background, or sets text right up against it. The code itself is perfect and still fails.

The fix: leave a clear, light border at least four modules wide all round. Our QR Code Generator draws that four-module margin into every file it saves, so keep it when you place the code in a design.

2. It is too small or too dense for the distance

Every extra character in a code adds modules, and a code printed at a fixed size then has smaller modules. A long web address with tracking parameters can make a code so dense that a phone more than an arm’s length away cannot resolve it.

Two fixes, in order. Shorten what is inside: a plain address without tracking parameters makes a visibly simpler code. Then print it larger. How large for a given scanning distance, and how error correction changes the density, is covered in the guide to QR code size and error correction, so I will not repeat it here.

3. The colours are too close, or reversed

A phone separates dark modules from light ones. Pale grey on white, navy on black or a brand colour on a similar background leaves too little difference. Our generator compares the code colour with the background and shows a warning when the contrast ratio falls under 3:1, the same contrast measure web designers use for text.

Reversed codes are the other trap: light modules on a dark background. They look stylish on a dark poster, and some phones, older ones especially, cannot read them, since the standard pattern is dark on light. The generator warns about these too, and its scan check treats them as unreadable.

Our scanner pages do read inverted codes, so a reversed code that reads in Scan QR Code from Image may still fail in other people’s camera apps. For anything printed for the public, use dark on light.

4. A logo covers too much of it

Error correction lets a QR code survive damage: extra codewords rebuild the parts that are missing. Denso Wave’s page on the subject lists four levels and notes that “Level M (15%) is most frequently selected.” A logo in the middle uses up that margin before the code has suffered any real damage, and a scuff or a crease then finishes it off.

Our generator keeps the logo well inside the limit at each level: at most 2% of the code at L, 5% at M, 9% at Q and 12% at H. Those limits are deliberately far below what each level can repair, so the code keeps its margin for real-world wear. When you add a logo, the generator switches error correction to H, and it warns you when the logo grows past the limit for the level you chose.

Before you print, the generator reads the finished picture back on your device and says Scans correctly or Hard to scan, with the likely reason. Treat Hard to scan as a stop sign, whatever the design looks like.

Try it: QR Code Generator

A four-module margin in every file, warnings for low contrast, reversed colours and oversized logos, and a scan check before you save.

Open tool

5. Printing, light and the surface

A code that scans from the screen can fail on paper or on a product. The table above shows why: the decoder read 100% of codes photographed close and straight, but 58.5% under glare, 56.7% on curved surfaces and 25.8% with spots of bright light across them. Damage was worse still, at 30.2%.

What helps when the code is printed:

  1. Print on matte paper or with a matte laminate. Gloss throws back the light from a ceiling lamp straight into the camera.
  2. Keep it flat. On a bottle or a cup, make the code small relative to the curve, or place it on the flattest part, so it does not wrap.
  3. Put it where the camera can face it. A code on a ceiling or near the floor gets scanned at a steep angle, and angled codes read 62.9% of the time in our measurement.
  4. Test it where it will hang. Scan the printed code in the real light, from the distance a person will stand at, with an older phone if you can borrow one.

When you are the one scanning a stubborn code, move to cut the glare, step back so the whole code and its margin are in the frame, and hold the phone still for a second. Or take a photo and open it in Scan QR Code from Image, which works on the still picture instead of the moving camera feed. QR Code Scanner uses your camera in the browser if your phone’s own camera app gives up.

6. The code reads, but the content is wrong

If the scanner shows the text but nothing works, the problem is inside the code.

A link that goes nowhere. Open the text the scanner shows and check it for a typo or a missing part. A code from a service that hosts a short link stops working when that service or subscription ends. A code that holds the address itself never expires; every code made on this site does that.

Wi-Fi that will not join. A Wi-Fi code holds the network name, the password and the security type. Check all three against the router: WPA/WPA2 is the usual type, and a wrong type fails even with the right password. A network that does not broadcast its name needs the hidden-network option ticked. Names and passwords that contain a backslash, semicolon, comma, colon or double quote must have those characters escaped inside the code; the Wi-Fi QR Code Generator does that for you, and hand-typed codes from other tools often do not.

Arabic or Urdu text that turns into question marks. The generator must encode text as UTF-8. Ours does; some older generators do not.

A quick checklist before you print

  1. Read the finished code from a photo, and check the text it shows.
  2. A blank margin four modules wide on every side.
  3. Dark code on a light background, with strong contrast.
  4. A logo only with error correction at H, and the generator’s scan check green.
  5. Matte, flat and at a size suited to the distance.
  6. Test the printed copy in the place where people will scan it.

Frequently asked questions

Why is my QR code not scanning?

The usual causes are a missing blank margin around the code, a code too small or dense for the distance, weak contrast or light-on-dark colours, a logo that covers too much, and glare or a curved surface. If the code reads but nothing happens, the link or Wi-Fi details inside it are wrong.

How do I check what is inside a QR code?

Take a sharp, straight photo or screenshot and open it in Scan QR Code from Image. It shows the text inside the code. If the text appears, the pattern is fine and the problem is the content, such as a typo in the link or a wrong Wi-Fi password.

How much blank space does a QR code need around it?

The QR code standard, ISO/IEC 18004, asks for a quiet zone four modules wide on every side, where a module is one of the small squares. The QR Code Generator here draws that margin into every file it saves.

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

Yes, with error correction at H and a small logo. The generator here keeps a logo to at most 12% of the code at H, warns when it grows past the limit for the chosen level, and reads the finished code back to say Scans correctly or Hard to scan.

Why does my Wi-Fi QR code not connect?

Check the network name, password and security type against the router; a wrong type fails even with the right password. A hidden network needs the hidden option ticked, and a backslash, semicolon, comma, colon or double quote in the name or password must be escaped. The Wi-Fi QR Code Generator does that for you.

Written by Saad Naeem

AI engineer in Doha who builds every tool on ToolboxHere. The figures in the guides come from the official sources named in them or from the tools themselves. Found a mistake? Tell us and it is corrected.

Found this guide useful?

Related guides