A QR code that scans fine on your monitor tells you very little about the printed version. On paper it's smaller, it sits next to other graphics, the light is worse, and once the flyers are printed you can't fix it.
Most of what goes wrong is predictable, though, and you can test it before anything is printed. I made QR codes for four URLs with the free FindUtils QR Code Generator, decoded every download, and then ran codes of the same size and error-correction level through a simulated camera: shrink, blur, add noise, try to read it. The questions were the ones that come up before a print run. How big does it need to be? How much white border does it need? Can a logo go in the middle? Do colours matter?
One thing up front: a simulated camera is not a phone. The decoder here is zxing-cpp, a widely used open-source barcode library, and phone camera apps have their own decoders, autofocus and image processing. Read the numbers as comparisons (this code needs twice the size of that one), not as guarantees. The last step of the checklist is a real print and a real phone.
The URL decides how dense the code is
A QR code is a grid of square "modules". The more characters you encode, the more modules it needs, so at the same printed size each module gets smaller. I generated four URLs in the FindUtils generator (1000 pixels, quiet zone 2 and 4), downloaded the PNG and SVG files, and decoded each PNG with zxing-cpp to read the QR version (the grid size) and the error-correction level:
| URL | Characters | Version | Modules per side | Error correction |
|---|---|---|---|---|
https://example.com/m | 21 | 2 | 25 | M |
https://example.com/menu | 24 | 2 | 25 | M |
…/spring-menu?utm_source=flyer&utm_medium=print&utm_campaign=spring-2026 | 90 | 6 | 41 | M |
the same with a longer path and a utm_content value | 160 | 9 | 53 | M |
All eight downloads decoded back to the exact URL. The generator always used level M. There's no setting for it yet, so if you need level Q or H (more on that below), you need a different generator for now.
The tracking parameters are what made the code dense. The 90-character UTM link needed 41 modules per side against 25 for the bare path. Shortening the values helps a bit: with utm_source=fl and utm_campaign=s26 the same link was 79 characters and version 5. What helps more is printing a short path on your own domain, like example.com/m, and redirecting it to the tagged URL on your server. The code stays at version 2, and you can change where it points after the flyers are printed. Check that the redirect keeps the query string. I wrote about tagging printed links in Tag the Links You Own.
How big to print it
The question that matters isn't how big the code is. It's how big one module is. Here's the module size for each of the three grid sizes at common printed widths, counting a 4-module white border on each side as part of the width:
| Code | 2 cm | 2.5 cm | 3 cm | 4 cm | 5 cm |
|---|---|---|---|---|---|
| Version 2 (25 + 8 modules) | 0.61 mm | 0.76 mm | 0.91 mm | 1.21 mm | 1.52 mm |
| Version 6 (41 + 8 modules) | 0.41 mm | 0.51 mm | 0.61 mm | 0.82 mm | 1.02 mm |
| Version 9 (53 + 8 modules) | 0.33 mm | 0.41 mm | 0.49 mm | 0.66 mm | 0.82 mm |
To see why module size is what counts, I shrank each code until the "camera" had a given number of pixels per module, then added a slight blur and noise, and tried to read it 20 times per step:
menu v2 25x25 modules | 1.2px: 0% 1.5px: 0% 1.8px: 90% 2.0px:100% 2.5px:100% 3.0px:100% utm v6 41x41 modules | 1.2px: 0% 1.5px: 0% 1.8px:100% 2.0px:100% 2.5px:100% 3.0px:100% long v9 53x53 modules | 1.2px: 0% 1.5px: 0% 1.8px:100% 2.0px:100% 2.5px:100% 3.0px:100% All three codes behaved the same: at 1.5 pixels per module or fewer nothing read, and from 2 pixels per module everything did. The decoder doesn't care how many modules there are. It cares whether each module gets enough pixels. A real phone needs more margin than this clean simulation (focus, motion, angle, light), but the comparison holds. From the same distance, a code with smaller modules has to be printed bigger.
That's where the common rule of thumb, "printed size = scanning distance ÷ 10", falls short: it ignores what's in the code. If the rule works for a short version 2 code, the 160-character version 9 code needs about 1.85 times the printed width (61 modules with the border, against 33) to give the camera the same module size. At 2 cm, which many guides give as the minimum, its modules are 0.33 mm. Shorten the URL first, then decide the size.
The white border is not optional
The quiet zone is the empty border around the code. The QR standard asks for 4 modules on every side, and it's the first thing to disappear when a designer fits the code into a layout. I tested it the hard way: each code on a background of random black and white squares the same size as its modules, which is about the worst thing a code can sit next to. Ten backgrounds per border width:
menu v2 | border 0: 0/10 border 1: 10/10 border 2: 10/10 border 3: 10/10 border 4: 10/10 utm v6 | border 0: 0/10 border 1: 10/10 border 2: 10/10 border 3: 10/10 border 4: 10/10 long v9 | border 0: 0/10 border 1: 10/10 border 2: 10/10 border 3: 10/10 border 4: 10/10 With no border, none of the 30 codes could be read. With a 1-module border, all of them could. That says zxing-cpp is forgiving, not that 1 module is enough: it's one decoder on clean images. Different scanners need different margins, and you can't test them all. Keep the 4 modules the standard asks for, and make sure the white border survives into the print file.
In the FindUtils generator, the quiet zone slider starts at 2 blocks. For print, move it to 4 (the page's own tips say "at least 4 modules"). The SVG grows to match: the downloaded version 2 file had a 29-unit viewBox at margin 2 and 33 units at margin 4, so the border is part of the file and not something the layout program adds.
Logos: level H didn't buy more room than Q
QR codes include error correction at four levels, usually described as recovering 7% (L), 15% (M), 25% (Q) and 30% (H). Those percentages are of the code's data (codewords), not of the area you can cover, and the decoder isn't told which part is covered. I covered the middle of the 90-character UTM code with a white square, growing 1% of the area at a time, and noted the first size that broke it. I also tried the square shifted two modules off-centre:
EC L v5 37x37: centred fails first at 6%, shifted +2 modules fails at 6% EC M v6 41x41: centred fails first at 13%, shifted +2 modules fails at 11% EC Q v8 49x49: centred fails first at 22%, shifted +2 modules fails at 18% EC H v9 53x53: centred fails first at 20%, shifted +2 modules fails at 22% Two things stand out. Moving the logo two modules changed the limit by up to 4 percentage points, because it changes which data blocks get hit. And level H, centred, broke earlier than level Q. H also made the code denser (version 9 instead of 8 for the same URL), so the modules got smaller as well. More error correction isn't automatically more room for a logo.
The practical version:
- With level M, which is what the FindUtils generator makes, don't put a logo on the code. In this test, M broke at 11% to 13%, and a real print has smudges and glare using up some of the same margin.
- If you need a logo, use a generator that offers level Q, keep the logo well under the limit you measure (I'd stay near half of it), and test that exact file. Don't rely on the percentage from a table, including the one above, because it's for one URL, one decoder and a perfectly clean image.
Colours: dark on light, never the other way round
I rendered the short code in four colour pairs and read each one twice, once normally and once with the decoder's inverted-image pass turned off:
black on white default: True without invert pass: True mid grey #777 on white default: True without invert pass: True light grey #bbb on white default: True without invert pass: True white on black (inverted) default: True without invert pass: False Even light grey read, but this is a clean digital image. Paper, ink spread and a dim room all cut contrast, so keep the modules dark. The inverted code only read because the decoder also tried an inverted copy of the image. Not every scanner does that, so a white-on-black code that reads on your phone can still fail on someone else's. If the design is dark, put the code on a white panel with its quiet zone.
PNG or SVG for print
Both downloads were clean. The 1000-pixel PNGs contained only pure black and pure white pixels, with no grey edges (about 30 pixels per module for version 2). The SVGs were vector paths with no embedded image, so they scale to any size. For print, use the SVG and scale it in your layout program. The PNG at 1000 pixels is still sharp at small sizes (about 850 pixels per inch at 3 cm), but it gets soft when you enlarge it for a poster.
The script
This is the camera and logo test from above, cut down to the essentials. It makes the code with segno, then shrinks, blurs and adds noise to it, or puts a white square in the middle, and checks whether zxing-cpp still reads the exact URL:
# pip install segno zxing-cpp pillow numpy import numpy as np, segno, zxingcpp from PIL import Image, ImageFilter URL = 'https://example.com/spring-menu?utm_source=flyer&utm_medium=print&utm_campaign=spring-2026' rng = np.random.default_rng(26) def code(url, ec='m', border=4, px=20, cover=0.0): m = np.array(segno.make(url, error=ec, micro=False, boost_error=False).matrix, dtype=np.uint8) n = len(m); side = round(n * cover ** 0.5); o = (n - side) // 2 m[o:o + side, o:o + side] = 0 # a white "logo" square in the middle img = np.where(np.pad(m, border) == 1, 0, 255).astype(np.uint8) return Image.fromarray(img).resize((img.shape[1] * px,) * 2, Image.NEAREST), n def camera(img, px_per_module, px=20, blur=0.7, noise=10): w = round(img.size[0] * px_per_module / px) # fewer camera pixels per module = further away a = np.array(img.resize((w, w), Image.BOX).filter(ImageFilter.GaussianBlur(blur)), float) a += rng.normal(0, noise, a.shape) return Image.fromarray(np.clip(a, 0, 255).astype(np.uint8)) def reads(img, url): return any(r.text == url for r in zxingcpp.read_barcodes(img, formats=zxingcpp.BarcodeFormat.QRCode)) img, n = code(URL) for ppm in (1.5, 1.8, 2.0, 2.5): print(f'{n} modules, {ppm} camera px/module: {sum(reads(camera(img, ppm), URL) for _ in range(20)) * 5}% read') for ec in 'lmqh': first = next(p for p in range(2, 41) if not reads(code(URL, ec, px=6, cover=p / 100)[0], URL)) print(f'EC {ec.upper()}: a centred logo first breaks the code at {first}% of the area') Its output on my machine:
41 modules, 1.5 camera px/module: 0% read 41 modules, 1.8 camera px/module: 100% read 41 modules, 2.0 camera px/module: 100% read 41 modules, 2.5 camera px/module: 100% read EC L: a centred logo first breaks the code at 6% of the area EC M: a centred logo first breaks the code at 13% of the area EC Q: a centred logo first breaks the code at 22% of the area EC H: a centred logo first breaks the code at 20% of the area Put your own URL in URL to see its grid size and how much room a logo really has.
What this doesn't test
- Real phones and camera apps. Their decoders, autofocus and image processing differ from zxing-cpp on a synthetic image.
- Paper and print. Glossy paper and glare, ink spread, curved surfaces like cups or bottles, low light and scanning at an angle were all left out.
- Logos as they really are. The "logo" was a plain white square. A coloured logo with its own edges can confuse a decoder more.
- One URL for the logo test. Other contents and sizes put the data blocks in different places, so the limits move.
Checklist before the print run
- Shorten what you encode. Print a short path on your own domain and redirect it to the tagged URL. Check that the redirect keeps the query string.
- Decide the size from the module size, not the code size. A 160-character URL needs about 1.85 times the printed width of a 21-character one for the same scanning distance.
- Keep a 4-module white border in the actual print file, on every side.
- No logo on a level M code. If you need a logo, use level Q, stay well under the limit you measure, and test that file.
- Dark modules on a light background. No inverted codes.
- Use the SVG for print.
- Print one copy at the real size on the real paper, and scan it with at least two different phones' camera apps, from the real distance, in the light where it will hang. Open the link and check it lands on the right page with the tracking intact.
The FindUtils QR Code Generator runs in the browser, and its QR code guide covers the content types (Wi-Fi, vCard, email) that this test didn't. For more free tools that run in your browser, see findutils.com.
Need help with a project? The team behind FindUtils takes on freelance work on Upwork, including a React Native app for iOS and Android connected to your web app, for example a scanner that checks printed codes against the right landing pages before a print run.

