Why is my QR code not scanning? What we found by damaging codes on purpose
If it is your own code, the surest fix is a new one: make it here, dark on light, with the full margin. Below, how to tell the code from the phone, and the size, blur, colour and margin at which our test codes stopped scanning. Nothing you type is uploaded.
Size to save
Error correction
Higher levels survive more dirt and damage, but the squares get smaller. If in doubt, leave it on M.
Colour
Logo in the middle (optional)
PNG, JPEG or WebP. It stays in your browser and is never uploaded.
Version 2 (25×25 squares) · 22 bytes · saved at 512×512 px
For print, or anywhere it will be enlarged, SVG stays sharp at any size.
The QR code is made in your browser. The link, text or Wi-Fi password you enter is never sent anywhere.
When a QR code will not scan, the problem is either in the code or in the phone reading it. This article starts with how to tell which. Then it gives what we found when we made codes the same way as this site's generator and deliberately shrank, blurred, compressed, recoloured and covered them before reading them back, and how to fix each.
First: is it the code or the phone?
Scan a different QR code with the same phone. If that one works, the phone is fine and the code you started with is the problem. If no code scans, look at the phone side: a dirty lens or the camera app's settings. Those steps differ by phone, so they are not covered here.
Scanning the same code with another phone or another app also helps. If it works there, the code itself is readable.
If the code scans but the page does not open, the pattern is not the problem. Check the link for a typo, and whether the page has been deleted or moved. Some apps will not open a link that does not start with https://.
If someone else made the code, you cannot fix the pattern from your side. Tell whoever put it up, or look for the link or the name printed near it.
How we tested: damage on purpose, then read it back
We turned 20 different links of the same length (47 bytes) into QR codes at error correction level M, the same way this site's generator does. Each small black or white square is a module; we call it a square, as the generator does. These codes were 33 squares across, or 41 with the margin. We damaged them one condition at a time, read them with the decoding library jsQR, and counted how many of the 20 came back as the exact link (7 November 2026).
We did not test with phone cameras. There was one decoder, and the damage was made on the image. Read the numbers as the order in which things go wrong, not as limits for any particular phone.
Too small: below 1.5 px per square it fails abruptly
Shrinking the image, all 20 scanned at 2 px per square (82 px across) and at 1.5 px per square (62 px across). At 1.4 px (57 px) only 3 did, and at 1.3 px (53 px) none. There was almost no gentle middle ground between sizes that scan and sizes that do not.
At exactly 1 px per square all 20 scanned, but only because the squares lined up with the pixels; at 0.9 px none did. It is not a size to rely on. And this is the floor for an image handed straight to the decoder. A camera adds blur, so in practice a code needs to be larger than this (our inference; we did not measure it).
The longer the content, the more squares. At level M, 30 bytes took 29 squares, 60 bytes 33, 100 bytes 41, 200 bytes 57 and 300 bytes 69. Printed 20 mm (about 0.8 in) square including the margin, one square is then 0.541 mm, 0.488 mm, 0.408 mm, 0.308 mm and 0.26 mm wide.
We did not check an official minimum print size, so none is given here. To print small, shorten the link or lower the error correction to cut the number of squares, and always scan a test print with a phone.
Blur: at 0.4 of a square, almost nothing scans
We applied a Gaussian blur to codes at 8 px per square. With the blur's strength (its standard deviation) up to 0.35 of the square width, all 20 scanned; at 0.4, 1 did; at 0.45, none. The edge is sharp here too.
Because the measure is the width of a square, the same amount of defocus defeats a code with small squares first. A phone held very close to a small code may not focus at all. Move back a little and scan it again in good light.
Compression: a big code survives, a small one does not
We saved codes as JPEG and read them again. A code at 4 px per square (164 px across) still scanned all 20 times at JPEG quality 1, at 1,542 bytes. At that size compression alone did not stop it.
At 2 px per square (82 px), quality 10 still gave 20, but quality 1 gave 1. At 1.5 px per square (62 px), which scanned 20 times when only shrunk, quality 90 gave 15, quality 75 gave 1, quality 50 gave 6, and quality 30 or lower gave none. The results do not follow the quality in order because that size sits right on the edge of readable.
If a QR code sent as an image will not scan, suspect its size before its compression. The smallest PNG this site's generator saves is 256 px, which for the code we tested is about 6 px per square. How any app or service shrinks an image you send was not measured.
Colour: brightness difference matters, not hue
With a coloured code on white, orange (contrast 2.8:1) scanned all 20 times. Light blue (1.67:1), yellow (1.53:1) and light grey (1.47:1) scanned none. Red on green looks strongly different, but the two are close in brightness (1.47:1), and it scanned once.
Navy on grey (2.14:1) scanned all 20 times as a clean image. Given a little blur and noise, like a photo of the code, it fell to 9. Under the same treatment, black on white still gave 20 and orange on white 18. A colour pair that reads in a clean image can fail once it is photographed. The generator above warns when a pair is below 3:1.
A code with black and white swapped (white on black) scanned 0 times when the decoder was not set to try inversion, and 20 times when it was. Whether it reads depends on the app. We did not test which phone cameras do, so make the code dark and the background light.
Margin: keep the standard 4 squares
We placed codes with different margins on a photo. With no margin, none scanned; with a 1-square margin, all 20 did. A dark grey background gave the same result. Without a margin, the decoder cannot tell where the code ends and the picture begins.
jsQR managed with 1 square, but we tried one photo, and whether a phone camera manages with 1 was not tested. The standard margin, the quiet zone, is 4 squares. On a flyer or a photo, place the code with all 4 squares of blank margin around it.
Damage and logos: error correction fixes the centre, not the corners
We covered the centre of the code with a white square. By the length of its side, level L scanned 17 at 20% and 0 at 25%; M 20 at 30% and 0 at 35%; Q 20 at 35% and 1 at 40%; H 20 at 40% and 0 at 50%. That is a share of the side, so 40% is 16% of the area.
A higher level survives more damage but adds squares. For the same 47 bytes, L took 29 squares, M 33, Q 37 and H 41. On a code printed small, raising the level can push it into the size problem above.
The three large squares in the corners are what a reader uses to find the code. Covering the top-left one stopped all 20 at both M and H. A sticker or a fold over a corner is something error correction cannot repair.
When you add a logo in this site's generator, it clears about 26% of the side in the middle and holds error correction at H. Put a logo in the middle only.
The results (measured)
How many of the 20 links (47 bytes each) came back exactly. The reader is jsQR, not a phone camera. Error correction is M unless stated.
How many of 20 damaged QR codes scanned under each condition (measured)
Condition
Scanned (of 20)
Shrunk to 2 px per square
20
Shrunk to 1.5 px per square
20
Shrunk to 1.4 px per square
3
Shrunk to 1.3 px per square
0
Blur of 0.35 × the square width
20
Blur of 0.4 × the square width
1
JPEG quality 1, 4 px per square
20
JPEG quality 10, 2 px per square
20
JPEG quality 1, 2 px per square
1
JPEG quality 75, 1.5 px per square
1
Orange on white (2.8:1)
20
Yellow on white (1.53:1)
0
Navy on grey (2.14:1)
20
Navy on grey, photo-like image
9
White on black, inversion not tried
0
White on black, inversion tried
20
On a photo, no margin
0
On a photo, 1-square margin
20
Centre covered, 30% of the side (M)
20
Centre covered, 35% of the side (M)
0
Centre covered, 40% of the side (H)
20
Top-left corner marker covered (H)
0
Frequently asked questions
Why is my QR code not scanning?
First scan a different QR code with the same phone. If that one works, the phone is fine and the problem is in the code: usually it is too small, blurred, too low in contrast, or has no blank margin around it. If no code scans, look at the phone side: a dirty lens or the camera app's settings.
What is the minimum size for a QR code in pixels?
In our test the code was 41 squares across with its margin, and it scanned at 1.5 px per square (62 px in all) but dropped to 3 of 20 at 57 px. That is the floor for an image handed straight to a decoder; a camera adds blur, so give it more. Longer content means more squares, so the same size scans less easily.
What is the minimum size for a printed QR code in mm or inches?
We did not check an official figure, so none is given here. At 20 mm (about 0.8 in) square including the margin, each square of a code holding 100 bytes at level M is 0.408 mm wide. Shorter content makes the squares bigger. Print a test copy and scan it with a phone before you print the rest.
Why does my QR code not scan when printed?
Usually it is printed too small for the content it holds, the ink is too light against the paper, or something was printed right up to its edge. Shorten the link, keep the code dark on a light background, leave a blank margin of 4 squares, and save it as an SVG so it stays sharp at any print size.
Does compressing a QR code image stop it scanning?
Not at a sensible size. A code at 4 px per square still scanned at JPEG quality 1. A code at 1.5 px per square fell to 1 of 20 at quality 75. The size of the image matters before the compression does.
Will a coloured QR code scan?
If the difference in brightness is large enough. On white, orange (contrast 2.8:1) scanned, while light blue and yellow did not. Red on green looks very different but is close in brightness (1.47:1) and scanned once in 20.
Can an inverted QR code (white on black) be scanned?
It depends on the app. The decoder we used could not read one when it was not set to try inversion, and read all 20 when it was. We did not test phone cameras, so make the code dark and the background light.
How big should the quiet zone (margin) around a QR code be?
The standard margin is 4 squares. Placed on a photo with no margin, none of the 20 codes scanned. The decoder we used read them with a 1-square margin, but we tried one photo and no phone cameras, so keep the full 4.
Why does my QR code with a logo not scan?
Error correction can rebuild a covered centre, up to a point. At level H, codes with 40% of the side covered in the middle still scanned; at M, 35% was too much. A logo over one of the three large corner squares stops it at any level. This site's generator clears about 26% of the side for a logo and holds the level at H.
The tool at the top of this page is theQR code generator. It makes static codes that never expire, and what you type stays in your browser.