QR Codes

QR Code Error Correction and Sizing: The Numbers That Decide If It Scans

7 min read
By
QR Code Error Correction and Sizing: The Numbers That Decide If It Scans

Photo from Pexels

I got an angry email from a client once. Their QR code didn't work. "It just won't scan," they said. I asked for a photo of the printed piece.

The photo showed a 0.6-inch code, printed on a glossy label, with a logo covering the center, on a curved bottle. It scanned fine on my desk under a lamp. It failed in their warehouse under fluorescent lights, held by a forklift driver wearing gloves.

The code wasn't broken. The error correction and sizing were wrong. This is the part of QR codes that's not magic, it's math, and the math has answers.

What Error Correction Actually Does

QR codes use Reed-Solomon error correction. In plain terms, the code stores redundant data so the scanner can reconstruct the message even if part of the code is damaged, dirty, or covered by a logo.

There are four levels.

- **L (Low):** recovers 7% of the data. Smallest, densest codes. - **M (Medium):** recovers 15%. The default for most generators. - **Q (Quartile):** recovers 25%. - **H (High):** recovers 30%. Largest, least dense codes for a given amount of data.

Higher correction means more redundancy, which means more modules, which means a denser code for the same physical size, which means it needs to be printed bigger to scan reliably. There's no free lunch. But there is a right choice for each situation.

Which Level to Pick

The decision is driven by the environment the code will live in.

- **L:** digital screens, clean indoor print, no logos, no handling. A QR code on a website. - **M:** standard print, light handling, no logo. A flyer, a business card. - **Q:** print that will be handled, folded, or shipped. A mailed postcard, a product insert. - **H:** print with a logo in the center, outdoor exposure, scuffing, anything on packaging. A cereal box, a yard sign, a conference badge.

The client's bottle code should have been H. It was L. That's why a scuff killed it.

If you're adding a logo to the center, you must use at least H. The logo obscures data; the error correction rebuilds it. A logo with level L is a code that works on your screen and fails in the world. Our QR code generator lets you set the level; for branded codes, set H.

The Sizing Math

QR code size is measured by the width of one module (one small square), not the whole code. A code's physical width is its module count times the module size.

The module count depends on two things: the amount of data, and the error correction level. More data or higher correction means more modules, which means a denser code.

The minimum scannable module size, in the real world, is about 0.4mm (roughly 1/64 inch) for a clean print scanned up close by a modern phone. That's the floor. Everything above the floor is risk management.

The practical rule: the code's physical width should be about 1/10 of the scanning distance. A code scanned from 1 foot away (a business card) wants to be at least 1.2 inches. A code scanned from 6 feet (a poster) wants at least 7 inches. A code scanned from 20 feet (a billboard) wants 24 inches, which is why billboards rarely use QR codes and when they do the code is huge.

Real Dimensions That Work

Here are numbers I've tested across projects.

- **Business card:** 1.2 inches (30mm) for a short URL or vCard. 1.6 inches if there's a logo. - **Product packaging back panel:** 1.0 inch (25mm) for a short link, 1.5 inches for a vCard or WiFi code. - **Event poster, viewed at arm's length:** 2 inches (50mm) minimum. - **Event poster, viewed from 6 feet:** 4 to 7 inches. - **Yard sign, viewed from a passing car:** 6 to 10 inches.

These assume a clean print, matte finish, high contrast, and the right error correction for the environment. Deviate from any of those and you go up in size.

The Quiet Zone

The quiet zone is the empty margin around the code. The standard requires at least four modules of quiet zone on every side. Without it, the scanner can't find the code's edges and fails even though the code itself is intact.

This is the most overlooked rule. Designers crop the code to its bounding box to save space, and the code stops scanning. Leave the margin. If the code is 1.2 inches, the quiet zone adds about 0.15 inches around it. Plan for it in the layout.

Contrast, Briefly

Error correction rebuilds damaged data. It does not fix low contrast. A scanner has to see the dark modules against the light background, or nothing else matters.

The threshold is about 4.5:1 contrast between dark and light, the same as WCAG AA body text. Dark on light. No light yellow on white. No dark gray on dark gray. For branded colors, see our guide to branded QR codes with logos and colors.

Test Before You Print a Thousand

The single most reliable thing you can do is print one copy at the final size, on the final material, and scan it with two phones (one recent, one a few years old) in the lighting where it will live. If it scans in all three conditions, print the run. If it doesn't, change the size, the error correction, or the contrast, and try again.

This sounds obvious. It is the step most people skip. It is the step that separates codes that scan from codes that don't.

The Short Version

Pick the error correction level for the environment: L for screens, M for clean print, Q for handled print, H for logos and packaging. Size the code at 1/10 the scanning distance, with a four-module quiet zone. Keep contrast above 4.5:1. Print one and test before you print a thousand.

That's the whole game. The math is not hard. The rules are just rarely followed.

Frequently Asked Questions

What do the QR code error correction levels L, M, Q, and H mean?

They indicate how much damaged data the code can recover: L recovers 7%, M recovers 15%, Q recovers 25%, and H recovers 30%. Higher levels add redundancy, which makes the code denser for a given amount of data, so it must be printed larger to scan reliably.

How big should I print a QR code?

A practical rule is that the code’s physical width should be about 1/10 of the scanning distance. A business card scanned at 1 foot wants at least 1.2 inches; a poster scanned at 6 feet wants 4 to 7 inches. The floor for a scannable module is about 0.4mm on a clean print up close.

Why does my QR code scan on screen but not on paper?

Usually low error correction for the environment, or a missing quiet zone. Use level H for packaging or codes with logos, level M for clean print. Keep a four-module empty margin around the code, and ensure at least 4.5:1 contrast between the dark modules and the background.

Explore the QR Code Generator: Try it now

Try NovelCrypt Tools

Experience military-grade encryption for your sensitive data. Create self-destructing messages, encrypt files, or explore our experimental lab tools.

Explore NovelCrypt