QR codes: error correction and use cases

Published: 2026-09-05

How QR error correction levels L, M, Q, and H trade capacity for damage tolerance, when to use Wi-Fi and vCard payloads, and why quiet zone and contrast matter for reliable scans.

A QR code (Quick Response) is a 2D barcode that packs text into a grid of dark and light modules. Phones and scanners read the pattern, apply Reed–Solomon error correction, and recover the original string—even when part of the symbol is damaged or covered. That recovery budget is why logos can sit in the center of marketing codes, and why a scratched sticker on a warehouse shelf still often works.

Error correction levels

QR codes support four error correction (EC) levels. Higher levels reserve more of the symbol for redundancy, so less payload fits at the same version (size), but more damage is tolerable:

Level Approx. recovery Typical use
L (Low) ~7% of codewords Clean digital screens, short URLs, maximum capacity
M (Medium) ~15% Default for many generators; good general print
Q (Quartile) ~25% Outdoor stickers, partial wear, light overlays
H (High) ~30% Logos over the center, heavy print abuse, industrial labels

“~30% recovery” does not mean you can erase a third of the image arbitrarily. It means the Reed–Solomon layer can correct roughly that fraction of codewords under the conditions the standard assumes. Large solid blobs, low contrast, or a missing quiet zone can still fail even at H.

Practical rule: start at M for ordinary URL stickers. Bump to Q or H when you add a logo, print small, laminate, or expect dirt and folds. Use L only when the code is large, high-contrast, and short-lived (e.g. a one-time link on a bright display).

More ECC also tends to produce a denser (or larger) symbol for the same payload. If you encode a long Wi-Fi password plus SSID at H, you may need a bigger print area than the same data at L.

Quiet zone, contrast, and size

Scanners look for finder patterns and need a clear border—the quiet zone—around the symbol. The standard calls for at least four modules of empty margin (same color as the background). Cropping that margin in a CSS object-fit box or a tight PDF crop is a common cause of “it won’t scan.”

Other reliability basics:

  • Contrast. Dark modules on a light background (or the reverse, if your decoder supports it) beat low-contrast brand colors. Neon on neon fails outdoors.
  • Physical size. Tiny codes on packaging need higher print DPI and often higher ECC. If the module width approaches the camera’s resolution limit, no ECC level saves you.
  • Distortion. Stretching a QR into a non-square box in a layout tool breaks module geometry. Scale uniformly.
  • Reflective surfaces. Glossy laminate and curved bottles create glare; matte stock or a larger quiet zone helps.

Common payloads (what the pixels encode)

A QR code only stores a string. Conventions give that string meaning:

Mode Payload idea Example shape
URL Open a link https://example.com/invite
Plain text Show or copy text Invoice ID, short note, deep-link scheme
Wi-Fi Join a network WIFI:T:WPA;S:MySSID;P:secret;; (plus optional hidden flag)
Contact (vCard) Save a contact BEGIN:VCARDEND:VCARD

Phones recognize these patterns and offer “Open,” “Join network,” or “Add contact.” Encoding the wrong string (a bare SSID without the WIFI:… wrapper, or a half-baked vCard) still produces a valid QR—it just won’t trigger the helpful action.

Security note: a Wi-Fi QR contains the network password in plaintext inside the code. Anyone who scans or photographs it can join. Treat printed Wi-Fi codes like a password on a whiteboard: fine for a guest network at an event, risky for the corporate SSID on a public poster.

Use cases that fit (and ones that don’t)

Good fits

  • Marketing and packaging — short HTTPS links; use Q/H if you brand the center.
  • Event check-in — one URL or ticket token per badge; keep payloads short.
  • Guest Wi-Fi — encode SSID, security type, and password so visitors skip typing.
  • Business cards — vCard with name, phone, email, org; test on iOS and Android.
  • Internal ops — asset IDs or deep links where staff control lighting and print quality.

Weaker fits

  • Long documents — QR capacity is limited; link to a page instead of stuffing paragraphs.
  • Secrets that must stay secret — anything in the code is recoverable by anyone with a camera. Prefer short-lived tokens or authenticated URLs over embedding API keys.
  • Tiny fashion labels — if the printed symbol is under ~1–2 cm, expect scan failures unless you control phone distance and lighting.

Generate and scan locally

Online “QR makers” often upload your URL, Wi-Fi password, or vCard to a server. For guest Wi-Fi and personal contacts, that is unnecessary risk. A browser-only studio can build the symbol and decode camera or image scans without leaving the device—same privacy model as other local developer tools (Why “local only” matters for developer tools).

Try it on LocalTools

Open QR Code Studio:

  1. Generate — pick URL, plain text, Wi-Fi, or vCard; the preview updates as you type.
  2. Set error correction (L / M / Q / H), foreground/background colors, and quiet zone (modules).
  3. Download PNG, SVG, or WebP for print or web.
  4. Scan — upload an image or use the camera; copy the decoded string or open links.

Nothing is uploaded for processing; generation and decoding stay in your tab.

Related reading

All learn articles