How QR Codes Work

A complete guide to the technology behind QR codes — from data encoding to scanning.

What Does QR Stand For?

QR stands for Quick Response. The code was invented in 1994 by Masahiro Hara, an engineer at Denso Wave in Japan, originally for tracking car parts in manufacturing. The design was optimised for high-speed scanning — hence "Quick Response." Today, QR codes are used worldwide for everything from payments to advertising.

How Data Is Encoded

QR codes encode data as a two-dimensional matrix of black and white squares (modules). The data is converted to binary, then arranged in a specific pattern that includes three large finder patterns in the corners (for alignment), timing patterns (for sizing), format information, and the actual data modules. Four encoding modes are available:

  • Numeric — Digits only (up to 7,089 characters)
  • Alphanumeric — Letters A-Z, digits 0-9, and 9 symbols (up to 4,296 characters)
  • Binary/Byte — Any 8-bit data including full UTF-8 (up to 2,953 bytes)
  • Kanji — Japanese characters (up to 1,817 characters)

QR Code Structure

Every QR code contains these key components: the three finder patterns (the large squares in corners that help the scanner locate the code), the alignment pattern (smaller squares for distortion correction), timing patterns (alternating black/white modules between finders), format information (error correction level and mask pattern), version information (which size version), and the data and error correction codewords.

Error Correction

QR codes use Reed-Solomon error correction, which means even if part of the code is damaged or obscured, it can still be read. There are four levels:

Level L — 7%

Low recovery. Best for clean environments.

Level M — 15%

Medium recovery. Standard default.

Level Q — 25%

Quartile recovery. Good for printed media.

Level H — 30%

High recovery. Best when adding logos or used in harsh conditions.

Scanning Process

When you point your phone camera at a QR code, the scanner software detects the three finder patterns to locate the code, determines its orientation and size from the timing patterns, reads the format and version info to set up decoding, samples the data modules, applies the mask pattern to recover the original data, performs error correction to fix any errors, and finally decodes the binary data back into the original text, URL, or other format.

Related: QR Code Sizes and Error Correction | QR Codes for Business | URL QR Code