Skip to content
Toolverse

How to Make a QR Code That Scans Reliably

Practical rules for size, contrast, quiet zone, error correction and content length so your QR code works on the first try.

Published

A QR code that fails to scan is worse than no code at all: people try once, shrug, and move on. The good news is that almost every scanning problem comes from a handful of avoidable mistakes. This guide explains how a QR code is built and turns that into concrete rules you can apply with the QR Code Generator.

How a QR code is put together

A QR code is a grid of square cells called modules. The smallest version, version 1, is 21 × 21 modules; each version adds 4 modules per side, up to version 40 at 177 × 177. The generator picks the smallest version that can hold your content, so more content always means a denser grid with smaller modules.

Three large squares in the corners are finder patterns. They let a camera detect the code, work out its angle and estimate its size. Larger codes also contain smaller alignment patterns that help correct for perspective and curvature, and thin timing patterns that let the scanner count modules. Everything else carries your data plus error-correction information.

Keep the content short

Density is the biggest enemy of reliable scanning. A short link such as https://example.com/menu fits in a small, chunky grid that a phone can read from across a table. Paste a long tracking URL with a dozen parameters and the code can jump several versions, shrinking each module until a slightly blurry camera can no longer separate them.

Practical ways to keep it short:

  • Remove tracking parameters you do not need.
  • Link to a short, dedicated page rather than a deep URL.
  • For text codes, say less. A QR code is a pointer, not a document.

There are hard limits too. Even the largest version at the lowest error-correction level holds at most 2,953 bytes of arbitrary data, and you should never get anywhere near that for something people will scan with a phone.

Choose error correction deliberately

QR codes use Reed–Solomon error correction, the same family of codes used on CDs and in deep-space communication. You choose one of four levels, each able to recover from a share of damaged codewords:

LevelApproximate recoveryGood for
Labout 7%Screens and clean, controlled environments where density matters most
Mabout 15%The sensible default for most print and screen use
Qabout 25%Outdoor signs, packaging, surfaces that may get scuffed
Habout 30%Harsh conditions, or codes with a small logo placed over them

Higher levels are not free: the extra correction data makes the grid denser. For a short URL the difference is small, so Q or H is a cheap insurance policy for anything printed. For long content, a lower level may actually scan better because the modules stay larger.

Respect the quiet zone

The QR standard, ISO/IEC 18004, specifies a blank margin of at least four modules on every side. Scanners use this empty border to find where the code begins. Designers often crop it to make a layout tidier, or place the code right against a photo or a coloured edge. That is one of the most common causes of failure. If your background is busy, keep the generator's white margin in the file and in the final print.

Contrast and colour

Scanners convert the image to light and dark and look for the pattern. The safest choice is a dark pattern on a light background with strong contrast; pure black on white is ideal. Brand colours are fine if the pattern stays clearly darker: navy, deep purple or dark green on white all work well. Watch out for:

  • Inverted codes (light pattern on a dark background). Many modern phone cameras read them, but some scanner apps and older devices do not.
  • Low-contrast pairs such as yellow on white, or mid-grey on light grey. Our generator measures the contrast ratio and warns you when it is too low.
  • Gradients and photos behind the code. Keep the area under the code a single solid colour.

Size it for the scanning distance

A widely used rule of thumb is that the code should be at least one tenth as wide as the distance it will be scanned from. A code read from 30 cm away should be roughly 3 cm wide; a poster read from 3 metres needs something closer to 30 cm. For short URLs on business cards and flyers, about 2 cm is a practical minimum. Denser codes need more room than these figures suggest.

For anything printed, download the SVG version. It is vector-based, so the modules stay perfectly crisp at any size. Scaling up a small PNG can blur module edges, which confuses scanners. For screens, a PNG at the size you will display it is fine.

Logos, placement and surfaces

Dropping a logo in the middle of a code works only because error correction can rebuild the covered data. If you do it, use level H, keep the logo small, never cover the three finder patterns, and test thoroughly. Also think about where the code will live: glossy laminate reflects light, curved bottles distort the grid, and codes placed high on a wall or behind glass are awkward to frame with a phone.

Static codes and what they mean for you

The codes Toolverse creates are static: the content is stored in the pattern itself. They never expire and do not depend on any service staying online, but they also cannot be edited after printing, and they do not count scans. If you need to change the destination later, point the code at a page you control and update that page instead.

For Wi-Fi codes, remember that the password is readable by anyone who scans the code, so only display it where you would happily say the password out loud.

Test before you print

Finally, scan the real thing. Print a proof at the final size, then try it with at least two different phones, both iPhone and Android if you can, in the lighting where it will actually be used. Check that the link opens the right page and that the page works well on a small screen. Five minutes of testing saves reprinting a thousand flyers.

Try it yourself