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.

10 min read ToolsBasic
Advertisement icyabmod — admin panel included: update your website yourself, no code
QR Code Best Practice: Size, Error Correction and Redirects

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.

What makes a QR code scannable

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.

Size and reading distance

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.

Quiet zone and contrast

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.

Error correction level

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.

LevelRecoverable areaPattern densityTypical use
LAround 7%SparsestOn-screen display
MAround 15%BalancedGeneral print work
QAround 25%DenseCodes with a center logo
HAround 30%DensestOutdoors, 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.

Planning what goes inside a QR code

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.

  • Use a short, clean address. A link bloated with tracking parameters visibly thickens the pattern. The slug generator helps produce a tidy path segment.
  • Leave the letter case alone. The path of an address is case-sensitive. The QR standard does have a more compact mode limited to capitals, digits and a few symbols, but this generator encodes text as UTF-8 bytes, so the gain comes from a shorter address rather than from capitals.
  • Point at something permanent. A printed square cannot be edited. Aiming it at an address you control, rather than at the campaign page directly, keeps the destination changeable.
  • Accented characters are fine. Because the generator uses UTF-8, letters such as é or ñ are encoded correctly; each simply takes more than one byte and makes the square slightly denser.

Payload types and how to write them

The generator encodes your text exactly as typed. Most phone camera apps recognize certain patterns and offer the matching action:

GoalText to enterNote
Web pageexample.com/menu or a full addressThe shortest and most common payload
Phone calltel:+442079460123Include the country code
Emailmailto:hello@example.comAdding a subject enlarges the square
Wi-Fi networkWIFI:T:WPA;S:GuestNet;P:password;;Escape semicolons and colons with a backslash
Plain textAny noteThe 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.

Checking the redirect chain

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.

Test before you print

Seeing the square on a monitor proves nothing. A real test has four parts and all of them take minutes.

  • Scan on several devices. Camera quality and decoding software vary; three phones from two different manufacturers is a reasonable sample.
  • Print at final size. A square that works on screen may fail on paper. Produce the proof on the final material at the final dimensions.
  • Test from the real distance. Put the square where it will live and scan from where the visitor will stand.
  • Verify the file itself. Upload a screenshot of the final print file to the QR code reader. If your browser supports BarcodeDetector, every code in the image is listed; if it does not, as with Chrome on Windows, Firefox or Safari, the built-in decoder reads the first code it finds. With several codes in one image, crop each one and test it separately. Large photos are scaled down to 1600 pixels before decoding.

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.

Printing and placement

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 sidePixels needed at 300 DPITypical use
2 cmAbout 236 pxLabels, packaging
3 cmAbout 354 pxBusiness cards, leaflets
5 cmAbout 591 pxTable cards, menus
10 cmAbout 1181 pxA4 posters
20 cmAbout 2362 pxShop 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.

When not to use one

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.

Frequently asked questions

Does a center logo break scanning?

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.

Can I change where a printed code points?

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.

Can codes be colored?

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.

Why does it scan on some phones and not others?

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.

How do I measure scans?

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.

Related tools

Advertisement Kelivo — a word game by icyabmod, on Google Play and the App Store

More articles

Blog Posts
Advertisement icyabmod — get a website for your business, design it on a live demo

Blog Posts