QR Code Best Practice: Size, Error Correction and Redirects
Whether a code scans depends on physics, not content: size, contrast, quiet zone and error tolerance. From generation to print, Wi-Fi and contact payloads to redirect chains.
Whether a code scans depends on physics, not content: size, contrast, quiet zone and error tolerance. From generation to print, Wi-Fi and contact payloads to redirect chains.
Five rules make a QR code scan almost anywhere: make the printed side about a tenth of the reading distance, use a dark pattern on a light background, never crop the empty border around it (the quiet zone), keep the payload as short as you can, and test at final size on several phones before printing. When codes fail in the field, the cause is almost never the payload; it is size, contrast, quiet zone and print quality. A square that will not scan is worse than no square at all, because it makes a promise and breaks it. This article gathers the decisions that actually determine the outcome, from generation through to paper.
Generation and verification belong together. The QR code generator builds the code on your device, sends the text to no service, and downloads a PNG at least 320 pixels wide. The QR code reader also decodes on your device without uploading the image, so proving a square scans before anything gets printed costs nothing. To see where the address behind it really leads, the redirect checker walks the chain, and the URL encoder and decoder makes the parameters readable.
A camera needs three things to resolve the square: enough pixels, enough contrast and enough empty space around it. Miss any one of them and the scan fails no matter how short the payload is.
A rough rule holds up well: the printed side length should be about a tenth of the distance it will be read from. A code on a handheld leaflet, read from 30 centimetres, works at 3 centimetres. A code in a shop window read from two metres needs to be 20 centimetres across. The 1.5-centimetre squares that come off desktop printers are technically valid and fail regularly in practice. Longer payloads produce finer patterns, so scale up for them.
The square needs a clear border on all four sides, four modules wide, a module being the smallest square in the pattern. The PNG from the generator already includes that border, so do not trim the white margin when placing it in a layout. The contrast rule is simple: dark pattern on a light background. The generator draws a black pattern on white, which is the safest combination for scanning. Inverted codes, light on dark, fail on many readers.
The square carries redundant data so it still resolves when part of it is damaged. That redundancy comes in four grades, and the higher the grade, the denser the pattern.
| Level | Recoverable area | Pattern density | Typical use |
|---|---|---|---|
| L | Around 7% | Sparsest | On-screen display |
| M | Around 15% | Balanced | General print work |
| Q | Around 25% | Dense | Codes with a center logo |
| H | Around 30% | Densest | Outdoors, surfaces that wear |
The QR code generator uses level M, a balanced choice for everyday print such as leaflets, business cards, menus and posters. It has no color or logo options. Dropping a logo into the middle afterwards in a design program eats most of level M's roughly 15% margin, so we recommend using the generated code without one. If a logo is mandatory, you need a code produced at level Q or H, and it must be tested on many devices.
The more data the square carries, the finer its pattern and the larger it has to be printed. Shortening the payload therefore buys readability directly.
The generator encodes your text exactly as typed. Most phone camera apps recognize certain patterns and offer the matching action:
| Goal | Text to enter | Note |
|---|---|---|
| Web page | example.com/menu or a full address | The shortest and most common payload |
| Phone call | tel:+442079460123 | Include the country code |
mailto:hello@example.com | Adding a subject enlarges the square | |
| Wi-Fi network | WIFI:T:WPA;S:GuestNet;P:password;; | Escape semicolons and colons with a backslash |
| Plain text | Any note | The reader just displays it |
Network details are a special case: remember that the password is exposed to anyone who can see the square. Reasonable for a guest network, never for a company one. A contact card with a name, job title, two phone numbers and an address easily runs to a few hundred characters, so print those a size larger.
If you route through an intermediate address, verify the chain is healthy. The redirect checker visits the address from the server and shows the chain step by step, with the status code and target of each hop. It follows up to 10 redirects, accepts only public http and https addresses, never downloads the page body, and allows 15 checks per minute. Run it once before going to print and look for three things: does the final step return 200, are permanent moves using 301, and has the chain grown to three or four hops for no reason? Every extra hop slows the first load on a mobile connection.
Seeing the square on a monitor proves nothing. A real test has four parts and all of them take minutes.
Set against the cost of discovering a fault after the campaign has started, that is nothing. On runs of thousands of copies, skipping the proof is the most expensive saving available.
A square that looks perfect on screen degrades on paper for three reasons: ink spread, insufficient resolution and the wrong surface. The generator's PNG is at least 320 pixels wide, and every module is drawn a whole number of pixels wide, so the edges are crisp. Working out the pixels you need from the print size at 300 DPI keeps things simple:
| Printed side | Pixels needed at 300 DPI | Typical use |
|---|---|---|
| 2 cm | About 236 px | Labels, packaging |
| 3 cm | About 354 px | Business cards, leaflets |
| 5 cm | About 591 px | Table cards, menus |
| 10 cm | About 1181 px | A4 posters |
| 20 cm | About 2362 px | Shop windows, large posters |
If you need a larger file, the image resizer can enlarge the output up to 4000 pixels; scaling by whole multiples, such as 2× or 4×, keeps module edges at their cleanest. Edges can soften slightly during enlargement, so always run a scan test on the final file. Large posters viewed from a distance often get away with a lower density; ask your printer.
Two placement rules earn their keep. Do not put the square on a surface that curves, folds or reflects, and always add a few words telling people what it does. Something as small as “scan for the menu” makes people far more comfortable scanning. For accessibility, print the address in readable text as well, so visitors without a usable camera are not left out.
These squares do not belong everywhere. On a screen, the visitor is already at a device and would need a second one to scan; a plain link beats a square on a web page, except when you want to help someone move from desktop to phone. Anything in motion, or on screen for two seconds in a video, will not be read either; a short, memorable address does far more work there. And remember trust: a visitor cannot read where a square leads, so the line of text beside it is not a courtesy but part of what persuades them to scan.
It is a risk. The generator produces level M codes and does not add logos; a logo placed afterwards consumes most of the error correction margin. Past the threshold, the square scans on some devices and not others, which is the worst outcome because your own test may pass.
Not if it encodes the destination directly. That is why print work almost always deserves an intermediate address you control: the destination can move and the paper stays valid. After changing the redirect, test the chain again with the redirect checker.
The generator only produces a black pattern on white. If you recolour the code in a design program, keep the dark-pattern-on-light-background relationship, keep the brightness gap large, and avoid gradients or textured backdrops entirely.
That is nearly always a sign of a borderline design: slightly too small, a slightly narrow quiet zone or slightly weak contrast. Phones with strong cameras tolerate it and weaker ones do not. Printing one size larger usually ends the problem.
Adding a short marker parameter to the destination address is enough to separate that traffic; the longer the parameter, the denser the square. If you route through an intermediate address, the measurement can be collected there.
The difference between redirect types is covered in 301 vs 302 redirects. For preparing structured payloads before they go into a square, see working with JSON data; when the square is placed on a web page as an image, the alt text rules in image optimization for SEO apply. Generating a guest network password? See strong passwords and secure identifiers first.
The Turkish I Problem: Why Dotted İ and Dotless ı Break Case Conversion October 21, 2026
What Is WebP? How to Open WebP Files and When to Convert Them October 13, 2026
PNG vs JPG: The Real Differences and Which Format to Use When October 7, 2026
How to Reduce Image File Size: Shrink a Photo From MB to KB October 1, 2026
What Is AVIF? Support, AVIF vs WebP vs JPEG, and How to Open It September 25, 2026
What Is an IP Address? IPv4 vs IPv6, Public vs Private, and Privacy September 19, 2026