Guide

How QR Codes Work

QR codes look like random black-and-white noise, but every square carries meaning. This guide unpacks how they encode information and how to use them well.

Last updated July 16, 20265 min read

What a QR code actually is

A QR code (Quick Response code) is a two-dimensional barcode that can hold up to a few thousand characters of text. Unlike traditional 1D barcodes, it can be scanned from any angle.

It was invented in Japan in 1994 for tracking car parts, and became mainstream once smartphone cameras started reading them natively.

Anatomy of a QR code

  • Finder patterns: the three large squares in the corners help scanners orient the code.
  • Alignment and timing patterns: help correct for distortion or a tilted camera.
  • Data modules: the small squares that actually encode the payload.
  • Error correction: extra data that lets a QR code stay readable even if partly damaged.

Error correction levels

QR codes come in four error-correction levels — L, M, Q, and H — allowing roughly 7%, 15%, 25%, and 30% of the code to be damaged while still scanning.

Higher error correction produces a denser code but survives smudges, logos, and creases better.

Example: Marketing codes with a logo in the middle usually use level H so the logo can safely cover part of the data.

Common uses

  • Restaurant menus and product pages.
  • Sharing WiFi credentials at home or in offices.
  • Event tickets and boarding passes.
  • Payment links and app store redirects.

Best practices when generating QR codes

  • Keep the URL short — shorter payloads produce simpler, more scannable codes.
  • Test print sizes: 2×2 cm is a safe minimum for phones at arm's length.
  • Keep at least a 4-module white border (the 'quiet zone') around the code.
  • Prefer high contrast — dark modules on a light background scan most reliably.
Share:

Frequently asked questions

Related guides

Related tools