QR code best practices: size, contrast, placement and testing
Almost every QR code that "doesn't work" was generated perfectly well — and then undermined by design or placement. Too small, too pale, stuck somewhere curved or shiny, or built from a link so long the pattern turned to porridge. The good news is that reliable scanning follows a handful of simple rules. Learn them once and your codes will scan first time, every time.
Rule 1 — Size it for the distance
The absolute minimum for print is about 2 cm × 2 cm (roughly 1 inch) — below that, phone cameras struggle to resolve the pattern. But minimums only work when the phone is close. A better rule of thumb: the scanning distance should be no more than ten times the code's width. A 2 cm code is comfortable at arm's length (up to ~20 cm away comfortably in practice, and a bit more in good light); a poster people scan from a metre away wants a code at least 10–15 cm wide; a billboard needs to be enormous, which is one reason billboard codes so often disappoint. When you generate the code, choose 512 or 1024 pixels so enlarging it never softens the squares.
Rule 2 — Contrast is not negotiable
Scanners don't see your brand palette; they see light and dark. The code must be significantly darker than its background — black on white is the gold standard, and deep navy, green, purple or burgundy on white or cream all work well. What fails: light grey or pastel codes on white, yellow on white, anything where the two colors have similar brightness, and inverted codes (pale pattern on a dark background), which many camera apps still handle badly. Also protect the quiet zone — the blank margin around the pattern, about four squares wide. Crowding text or graphics into that margin is a classic way to break an otherwise fine code.
Rule 3 — Keep the content short
The more data a code holds, the denser its grid of squares, and the harder it is to scan — especially small or in poor light. A short link makes a clean, chunky pattern; a 300-character URL full of tracking parameters makes a dense one that needs perfect conditions. Trim links before you encode them: drop the tracking tags where you can, and prefer short page addresses. The same applies to text — if a paragraph must be shared, link to a page containing the paragraph instead of encoding the paragraph itself.
Rule 4 — Use error correction when it counts
Error correction lets a code survive damage. Level M (~15%) is fine for screens and careful indoor prints. Step up to level H (~30%) for stickers, outdoor signs, packaging that gets handled, or any design where a small logo sits in the center of the code. The pattern gets slightly denser as the level rises, so for H codes, print a touch larger to compensate.
Rule 5 — Place it where phones can reach it
Put codes at a comfortable height on flat, matte surfaces. Avoid wrapping them around bottles, poles and corners; avoid glossy lamination that reflects the sky or ceiling lights into the camera; and never put a code somewhere the audience can't physically pause — on a moving vehicle, in a 3-second TV slot, or across a road. Add a short line of text under the code saying what the scan delivers ("Scan for the menu", "Scan to join Wi-Fi"). People scan far more often when they know what they'll get.
Rule 6 — Test like a stranger
Test the final artwork, not the freshly generated file: print it at the real size, stick it in the real place, and scan it with at least two phones — an iPhone and an Android — in the real lighting, from the real distance. Check the destination opens correctly and isn't behind a login or a typo'd address. Five minutes of this has saved more campaigns than any other step on this page.
The five mistakes that break the most codes
- Printing a dense, long-URL code at business-card size.
- Matching the code color to a pale brand palette and losing the contrast.
- Letting a designer crop away the quiet zone to make the layout "tighter".
- Stretching or squashing the image so the squares stop being square.
- Never test-scanning the printed piece before the full run.
Follow the six rules and every code you make with the QRGen generator will be the kind people barely notice — because it simply works.
Frequently asked questions
Why won't my QR code scan?
Usually one of five things: low contrast, printed too small for the distance, a missing quiet zone, glare or damage, or a very long link making the pattern extremely dense. Shorten the content, raise the contrast, print bigger, and retest.
Can I put a logo in the middle of a QR code?
Yes — generate at error correction level H (survives ~30% coverage), keep the logo small and centered, stay away from the three corner squares, and test-scan the final artwork.
Can a QR code be any color?
Almost. The hard rule is contrast: code much darker than background. Avoid pale-on-white, fading gradients, and inverted (light-on-dark) codes.
How long do printed QR codes last?
The code never expires — it works while it stays readable and its destination exists. Outdoors, sun and weather are the enemies: use level H and weather-resistant printing.
Now put it into practice: create your QR code →