The short version
- The working rule for size is distance divided by ten: a code scanned from 2 metres wants to be about 20cm across.
- Keep the URL short. Less data means larger modules at the same physical size, which scans from further away.
- Always leave the quiet zone — four modules of blank margin on every side. Cropping it is a very common cause of failure.
- Use M error correction for screens and clean print, and Q or H only when the code may be damaged, curved or partly covered.
- Print from SVG or PDF, never from a small PNG. Vector output stays sharp at any size.
QR codes fail for a small number of well-understood reasons, and almost none of them are the fault of the generator. The code either arrives too small for the distance it is being scanned from, too low in contrast, cropped too tight, printed from a low-resolution raster, or carrying so much data that the pattern is too dense to resolve. Each has a straightforward fix.
The useful thing to understand first is that a QR code's difficulty scales with how much you put in it. More data means more modules — the small black and white squares — packed into the same area, and finer modules need either a bigger code or a closer camera. A short URL and a long one with tracking parameters produce visibly different codes, and the long one is meaningfully harder to scan.
That gives you the single most effective lever: put less in the code. A short link is not a cosmetic preference, it is the difference between a code that scans from across a room and one that needs to be held at arm's length.
Size: the distance-over-ten rule
The practical guideline used across the industry is that a QR code should be about one tenth as wide as the distance it will be scanned from. A code read from half a metre away — a table tent, a business card, a product label — wants to be around 5cm across. One on a wall read from 3 metres wants about 30cm. One on a billboard read from 20 metres needs 2 metres, which is why billboard QR codes so often do not work: nobody budgeted that much space.
This is a floor, not a target. Going larger always helps and costs nothing but layout space, and the rule assumes a reasonably modern phone camera in decent light. Dim lighting, a cheap camera, an awkward angle or a moving scanner all effectively increase the distance, so add margin wherever the conditions are not ideal.
The rule interacts with data length. It assumes a code of moderate density; a code carrying a long URL has finer modules at the same physical width, and needs to be larger than the rule suggests to compensate. Shortening the data is usually easier than enlarging the print.
| Scanned from | Minimum width | Typical use |
|---|---|---|
| 30 cm | 3 cm | Business card, product label |
| 50 cm | 5 cm | Menu, table tent, packaging |
| 1 m | 10 cm | Shelf edge, flyer, window sticker |
| 2 m | 20 cm | Poster, exhibition panel |
| 5 m | 50 cm | Shop window, large signage |
| 10 m | 1 m | Building wrap, stage backdrop |
Error correction: what the levels actually buy
QR codes carry redundant data so that a damaged or partly obscured code still reads. There are four levels, and each states the proportion of the code that can be lost while still decoding: roughly 7% at level L, 15% at M, 25% at Q and 30% at H.
Higher is not automatically better, and this is where people go wrong. The redundancy is stored inside the same code, so raising the level adds modules — which at a fixed physical size makes every module smaller and the code harder to scan. Choosing H for a clean poster can produce a code that scans worse than the M version of the same content, because you have traded module size for damage tolerance you do not need.
Match the level to the risk. On a screen or clean printed page, nothing is going to be damaged, so M is right and L is acceptable for very long data where every module counts. Reach for Q or H when the code will be on a curved surface, exposed to weather or wear, printed on fabric, or deliberately overlaid with a logo in the centre — which is really just controlled damage.
| Level | Recoverable | Use it for |
|---|---|---|
| L | About 7% | Screens, very long data where size is tight |
| M | About 15% | The default. Screens and clean print |
| Q | About 25% | Curved surfaces, packaging, outdoor use |
| H | About 30% | Logo overlay, fabric, harsh conditions |
The quiet zone, and why cropping breaks a code
A QR code needs blank margin around it — the quiet zone — of at least four modules on every side. This is not decorative padding. A scanner locates the code by finding its three corner squares against empty space, and without that space it frequently cannot tell where the code ends and the design begins.
This is one of the most common real-world failures, because the quiet zone is exactly what a designer removes when fitting a code into a tight layout. Cropping to the edge of the pattern, placing the code hard against a coloured block, or setting it on a busy photograph all have the same effect.
Keep the margin, and keep it plain. White or a very light colour is safest. If the code has to sit on a photograph or a dark background, put it inside its own light panel rather than removing the margin.
Contrast, colour and inversion
Scanners look for a strong light-dark difference. Dark modules on a light background is what every decoder expects and what works most reliably. You can tint the modules, but the contrast against the background has to stay high — a mid-grey code on a white background scans poorly even though it looks fine to a person.
Inverting the code, with light modules on a dark background, is the risky one. Many current phone cameras handle it, and enough do not that it should be avoided for anything printed at scale. If a dark design demands it, test on several devices before committing to a print run.
Two more colour traps are worth knowing. A gradient across the modules reduces contrast somewhere in the code by definition, so keep gradients to the background if you use them at all. And a red-on-white code can scan badly under some lighting because of how sensors weight colour channels — dark blue or black is safer.
- Dark modules on a light background, with high contrast.
- Avoid inverted codes for print; test extensively if unavoidable.
- Keep gradients out of the modules themselves.
- Prefer black or a dark, saturated colour over mid-tones and reds.
Print from vector, not from a screenshot
A QR code is geometry, so it should reach the printer as geometry. An SVG or a PDF scales to any size with perfectly sharp module edges, while a PNG is a fixed grid of pixels that becomes soft as soon as it is enlarged past its natural size — and soft module edges are exactly what makes a decoder fail.
The failure mode here is subtle enough to survive proofing. A 300-pixel PNG blown up to a 20cm poster panel looks acceptable on screen at a glance, prints with visibly fuzzy squares, and scans unreliably in a way nobody catches until the posters are up. If the only option is raster, generate it at print resolution — at 300 dpi a 20cm code is about 2,400 pixels — rather than enlarging a small one.
For anything going to a professional printer, PDF is the most predictable choice, since it carries the geometry and the intended physical size together.
Encode the right thing for the job
A QR code can hold more than a URL, and using the right encoding turns a two-step interaction into one. A wifi code joins a network directly rather than making a guest type a password. A contact code adds a full vCard to the address book in one action. There are standard encodings for phone numbers, email, SMS, geographic coordinates and calendar events, all of which phone cameras recognise and offer the matching action for.
The one to be careful with is length. A full vCard with address, several phone numbers and a website is a lot of data, and it produces a dense code that needs to be physically larger. If a contact code has to be small, include name, one phone number and an email, and leave the rest to the website.
For URLs, shorten before encoding. Stripping tracking parameters and using a short domain reduces the module count noticeably, which buys either a smaller printed code or a longer scanning distance from the same one.
Try it on QR Code Generator
Free, no signup, no watermark. Runs on Zyff’s servers, so you get the same result on a phone as on a desktop.
How to make a QR code that scans reliably
Shorten the content first
Trim the URL — drop tracking parameters and use the shortest form that works. Less data means fewer, larger modules at the same physical size, which is the cheapest possible improvement to scanning distance.
Pick the content type, not just a URL
In Zyff's QR generator, choose the type that matches the job — wifi to join a network, vCard for contact details, or the plain URL and text types. A purpose-built encoding lets the phone offer the right action instead of opening a browser.
Set error correction to match the surface
Leave it at M for a screen or a clean printed page. Raise it to Q or H only if the code will be curved, weathered, worn or partly covered by a logo — higher levels add modules, which makes each one smaller and can hurt more than it helps.
Work out the size from the scanning distance
Divide the expected scanning distance by ten to get a minimum width, then add margin for poor light or an awkward angle. A poster read from 2 metres needs about 20cm; do not let a layout squeeze it below that.
Keep the quiet zone and the contrast
Leave at least four modules of light, plain margin on every side, and keep the modules dark against a light background. If the code must sit on a photograph, give it its own light panel rather than cropping the margin away.
Download SVG or PDF for print
Export vector for anything printed, so module edges stay sharp at any size. Use PNG only for screens, and if a raster is unavoidable for print, generate it at full print resolution rather than enlarging a small one.
Test on more than one phone
Scan the final artwork at the real distance, on both an iPhone and an Android device, and in the lighting it will actually live in. Test the printed proof rather than the screen version — print is where size and contrast problems appear.
At a glance
| Content types | URL, text, email, phone, SMS, WhatsApp, wifi, vCard, location, calendar event |
|---|---|
| Error correction | L 7%, M 15%, Q 25%, H 30% |
| Output formats | PNG, SVG, JPEG, WebP, PDF |
| For print | SVG or PDF — vector, sharp at any size |
| Quiet zone | Four modules minimum on every side |
| Price | Free, no account needed |
Frequently asked questions
What size should a QR code be for printing?
About one tenth of the distance it will be scanned from. A 5cm code works at arm's length on a menu or business card, a 20cm code suits a poster read from 2 metres, and a billboard read from 20 metres genuinely needs about 2 metres. Treat that as a minimum and go larger where lighting or angles are unfavourable.
Which QR error correction level should I use?
M for almost everything — screens and clean printed material. Use Q or H only when the code may be damaged, curved, weathered or covered by a logo. Higher levels are not automatically better: they add modules, so at a fixed size each module is smaller and the code can become harder to scan than it would have been at M.
Why is my QR code not scanning?
Work through five things in order: it is too small for the distance, the quiet zone has been cropped, contrast is too low, it was printed from a small raster image and the module edges are soft, or the content is so long that the pattern is too dense. Size and the missing quiet zone account for most real-world failures.
What is a QR code quiet zone?
The blank margin around the pattern, which must be at least four modules wide on every side. Scanners find the code by locating its corner squares against empty space, so without that margin they often cannot tell where the code ends. Cropping it to fit a tight layout is one of the most common causes of an unreliable code.
Can I put a logo in the middle of a QR code?
Yes, within limits, because error correction lets a portion of the code be unreadable. Keep the logo well under the recoverable percentage — comfortably below 30% of the area even at level H — leave the three corner squares completely clear, and test on several devices, since decoders vary in how much interference they tolerate.
Should I use PNG or SVG for a QR code?
SVG or PDF for anything printed, because vector geometry stays sharp at any size and soft module edges are what make a decoder fail. PNG is fine for screens at the size it was generated. If print requires a raster, generate it at full print resolution — roughly 2,400 pixels for a 20cm code at 300 dpi — rather than enlarging a smaller file.
Can a QR code share a wifi password?
Yes. There is a standard wifi encoding carrying the network name, security type and password, and both iOS and Android cameras recognise it and offer to join the network directly. It is the usual way to give guests access without reading out a long password, and it keeps the password off a printed card in plain text.
Do QR codes expire?
The code itself does not — it is a static encoding of whatever you put in it and will decode forever. What expires is the destination: if it points at a URL and that URL stops working, the code is useless. For anything printed in volume, point it at a stable URL on a domain you control rather than at a third-party short link.