My Tool Studio
Generators·5 min read

How QR Codes Work: Error Correction and Print Size

Scan a restaurant table tent and a menu opens; that little grid is doing more engineering than it lets on. Knowing what happens inside it makes you better at producing codes: you'll know why some scan from across a room while others fail at arm's length, what the four error correction levels sacrifice for their resilience, and how large a print run needs to be. This guide covers the module grid, the redundancy math, sizing rules with actual numbers, and the production mistakes that quietly sink scan rates.

QR

The QR code's second life on every table and package

From factory floors to your dinner menu.

Denso Wave invented the format in 1994 to track car parts, and for two decades it stayed mostly industrial. Then payment apps in Asia normalized scanning, camera apps gained native detection, and 2020 put QR menus on restaurant tables almost everywhere. Today the grid moves menus, boarding passes, payment handoffs, WiFi credentials, and product registration cards.

That ubiquity hides variety. A code that performs well on a phone screen can fail on a billboard, and one that scans in an email footer can misfire on a curved bottle. The physics is the same; the parameters change.

How QR codes work: modules, versions, and masks

A QR code is a square grid of modules, the black and white cells, ranging from version 1 at 21 by 21 up to version 40 at 177 by 177. Three large finder squares in the corners let a camera locate and orient the code from any rotation, while timing lines calibrate module spacing.

Your data is encoded into bits, laid into the grid in a zigzag, then XORed with one of eight mask patterns chosen to break up large blobs of a single color that would confuse scanners. The encoder picks whichever version is just big enough, which is why short URLs give you sparse, forgiving grids and long ones give you dense thickets.

Error correction levels, the QR code's spare tire

Every code reserves part of its capacity for Reed-Solomon error correction codewords, redundant data that lets a scanner reconstruct what dirt, glare, or a staple destroyed. The four levels set the size of that reserve: L recovers about 7 percent damage, M about 15, Q about 25, and H about 30.

The tradeoff is density. Redundancy consumes capacity, so the same URL at level H needs a bigger version, and therefore smaller modules at the same print size, than it does at level L. The QR Code Generator lets you pick any of the four and starts at M, the sensible middle. H earns its keep when a logo sits over the center, deliberately hiding modules the spare capacity can rebuild, which is why the tool switches to H as soon as you upload one.

A worked QR code example, from URL to grid

Take a concrete case. Input: https://example.com/menu, 24 characters. At medium error correction that fits version 2, a 25 by 25 grid. Rendered 320 pixels wide with a 2 module quiet zone, each module lands around 11 pixels wide, very generous by scanning standards, which is why short URLs scan so easily.

Now paste a 180 character tracking URL instead. The encoder climbs to version 9, a 53 by 53 grid, and each module shrinks below 6 pixels at the same render size. Nothing else changed, yet the code became twice as fussy about focus, lighting, and distance. Payload length is the single biggest lever you control.

Print size and scan distance for QR codes

The field rule: make the code at least one tenth as wide as the distance it will be scanned from. A counter card read at 25 centimeters needs 2.5 centimeters of code. A poster read from 3 meters needs 30 centimeters. A trade show banner read across an aisle needs more than most designers first sketch.

For translating pixels to paper, a 320 pixel PNG printed at 300 DPI comes out about 2.7 centimeters wide, fine for handheld range and too small for wall duty. Image downloads go up to 4096 pixels, and the PDF option skips the arithmetic by placing the code at an exact width from 20 to 150 millimeters. The SVG download sidesteps it too, since vectors rescale to any physical size without softening the module edges.

QR code mistakes that tank scan rates

Field failures trace back to a short list of causes:

  • Inverting the palette; light modules on a dark background defeat a surprising share of scanners, so keep the foreground darker than the background. The generator warns you when the scheme is inverted or the colors are too close.
  • Brand color pairs with weak contrast, like mid-gray on beige, that look elegant in a mockup and read as mush to a camera sensor.
  • Encoding the full campaign URL with every UTM parameter attached, when a shortened link would drop the grid several versions.
  • Oversized logos. The logo slider runs from 10 to 35 percent of the code; stay near the 20 percent default, at most 25, and test with more than one phone.
  • Crowding artwork against the code's edges; the tool adds a 2 module quiet zone by default and warns if you shrink it, so preserve it in your layout.
  • Decorating past the point of recognition. Dot styles such as dots or diamonds scan fine, but the three corner eyes are how a camera finds the code, so keep them solid and in a dark colour even when the body uses a gradient.

Three checks before your QR code meets a printer

Print one test sheet at final size and scan it under the venue's actual lighting, with an older phone if you can find one, since flagship cameras forgive sins that budget sensors won't. Shorten every URL before encoding so the grid stays sparse. And confirm the destination page is mobile friendly, because a flawless scan into a desktop-only page still loses the visitor.

Remember too that the codes are static: the data lives inside the image, so they never expire and nothing tracks scans. If the destination might change, point the code at a page on your own site that you can update later.

QR Code Generator or one of the specialized QR tools

This page is the generalist: 13 content types from URLs and WiFi to calendar events and UPI, gradients, dot and eye shapes, a center logo, a call-to-action frame, and PNG, JPG, WebP, SVG and PDF output. The WiFi QR Code Generator adds printable guest cards and table tents, and the vCard QR Code Generator adds every contact field, MeCard and the .vcf file. The Bulk QR Code Generator takes over when the job is a hundred codes from a spreadsheet, with label sheets included. For 1D symbologies like Code 128 or EAN-13, that's the Barcode Generator's territory.

Try it now

Open QR Code Generator

The tool is one click away. No sign up, no upload, no payment.

Open QR Code Generator