All guides
imgstools Team

Will Your QR Code Scan? We Tested Logos, Contrast, Blur and Margins

We generated QR codes and tried to break them with logos, light colours, blur and missing margins. The results show how big a logo can be, why error correction doesn't fix blur, and why short links scan better.

A QR code on a white card against a light purple background

A QR code that doesn't scan wastes a print run, a menu or a poster. Most failures come from a few design choices: a large logo, light colours, a code printed too small, or no white margin. We tested each one.

How we tested

We generated codes with the open-source qrcode library and decoded them with jsQR, the same libraries used by the imgstools QR code tool. Each design was decoded from a clean digital image. A phone camera adds angle, lighting and focus problems, so treat every "scanned" below as a best case.

The main test link was https://example.com/menu?table=12&utm_source=qr (47 characters).

1. Longer links make denser codes

A QR code is a grid of black and white squares called modules. The more data you put in, the more modules the code needs. Higher error correction also adds modules.

LinkLengthGrid at level MGrid at level H
https://ex.co/m15 characters25 × 2529 × 29
https://example.com/menu24 characters25 × 2529 × 29
The test link above47 characters33 × 3341 × 41
The same link with 3 more tracking tags108 characters45 × 4557 × 57

At the same printed size, a denser grid means smaller modules. If the pattern (not counting the white border) is 3 cm wide, a 25 × 25 grid has modules about 1.2 mm across. A 45 × 45 grid has modules about 0.7 mm across, which is much harder for a phone to read from a distance or in poor light.

Tip: keep links short. Remove tracking parameters you don't need, or use a short link on your own domain.

2. How big can a logo be?

Error correction lets a scanner rebuild missing data. There are four levels: L (about 7% recoverable), M (15%), Q (25%) and H (30%). We covered the centre of each code with a solid block and increased its size until the code failed.

Area coveredLMQH
5%failedscannedscannedscanned
10%failedfailedscannedscanned
15%failedfailedfailedscanned
20%failedfailedfailedfailed
25–30%failedfailedfailedfailed

QR codes at error correction level H with the centre covered by a block: 10% and 15% scanned, 20% failed

Level H, rated at 30%, failed at 20% coverage. The percentages describe how much data can be recovered, not how much area can be covered. A centre logo also covers the alignment marker (the small square-in-a-square near the centre on larger codes) and spreads damage over many blocks of data at once. The practical limit is lower than the label suggests.

Rules for logos:

  • Use level H whenever there is a logo.
  • Keep the logo to about 10% of the code's area, which is under a third of its width. That leaves a safety margin for real-world scanning.
  • Put the logo on a solid background plate, so its edges don't mix with the modules.

The imgstools generator does this for you: adding a logo locks error correction to H, places the logo on a plate, and limits its width to 28% of the image.

3. Contrast: lighter than you think fails

We printed the dark modules in lighter and lighter greys on a white background:

Module colourResult
Black #000000scanned
Dark grey #404040scanned
Mid grey #808080 and lighterfailed

Mid grey on white looks perfectly clear to a person, but the decoder could not reliably tell it apart from the background. Phone camera apps vary, and some are more tolerant than jsQR. Don't design for the best scanner.

Rules for colour:

  • Use dark modules on a light background. Some scanners can't read inverted codes (light on dark).
  • Brand colours are fine if they are dark: deep navy, dark green or burgundy. Avoid pastel, yellow or mid-grey modules.
  • Avoid gradients or photos behind the code.

4. Blur: error correction doesn't help

We blurred codes rendered at 4 pixels per module, as happens with soft printing, a smudged surface or a shaky photo:

Blur strength (Gaussian sigma)Level LLevel H
0.5 pxscannedscanned
1 pxscannedscanned
2 px or morefailedfailed

Level H failed at exactly the same point as level L. Error correction repairs missing modules, not blurred ones. When every edge in the code is soft, every module is uncertain. The fix for blur is bigger modules: print the code larger, or use a shorter link.

5. The quiet zone matters

The quiet zone is the empty border around a code. The QR standard asks for 4 modules. We placed a code on a dark grey background with no margin, and again with a 4-module white margin:

Placement on a dark backgroundResult
No quiet zonefailed
4-module white quiet zonescanned

Without the margin, the scanner can't find where the code starts. This is a common failure when a code is placed on a coloured flyer or cropped tight to fit a layout. In the imgstools generator, the quiet zone slider runs from 0 to 8 modules. Keep it at 4 for anything printed.

How big to print

A common rule of thumb is a code width of at least one tenth of the scanning distance:

WhereTypical distanceMinimum code width
Business card, label20–30 cm2–3 cm
Table menu, flyer30–50 cm3–5 cm
Poster on a wall1–2 m10–20 cm
Shop window, banner3–5 m30–50 cm

Use the larger end for long links, logos or low light. For print, export a large image (1000 px or more) or an SVG so the code's edges stay sharp.

Pre-print checklist

  1. Short link, so the grid stays small.
  2. Dark modules on a light background.
  3. Logo at level H, about 10% of the area or less.
  4. A 4-module quiet zone.
  5. Printed at least one tenth of the scanning distance.
  6. Test the printed proof with at least two different phones, at the real distance and lighting, before the full run.

You can design and check a code with the QR code tool. It also has a scanner tab, so you can test a code from a photo or your camera.

Keep exploring

More from imgstools

3 related notes