Back to Articles
Technology 29 Nov 2025 6 min read

How QR Codes Work: A Technical Deep Dive

L

LinkScan Team

Engineering

To the uninitiated, a QR code looks like digital noise. A random scattering of black squares on a white canvas. But within that chaos lies a highly structured, fault-tolerant system of data storage that has revolutionised how we bridge the physical and digital worlds.

The Anatomy of a QR Code

A QR (Quick Response) code is a matrix barcode. Unlike a standard 1D barcode that is read linearly, a QR code is 2D, meaning it stores data in both horizontal and vertical directions. This allows for significantly higher data density.

Every QR code is built upon a strict grid structure. Let us break down the key components that make it readable:

Finder Patterns

The three large squares in the corners. They tell the scanner "this is a QR code" and define its orientation. This is why you can scan a code upside down.

Alignment Patterns

Smaller squares found in larger codes. They help the scanner correct for distortion if the code is printed on a curved surface or scanned at an extreme angle.

Timing Patterns

Connecting the finder patterns are alternating black and white modules known as timing patterns. These act as a coordinate system, allowing the scanner to determine the size of a single module and the overall grid size.

The Quiet Zone

Every QR code requires a margin of white space around it. This "quiet zone" is essential for the scanner to distinguish the code from its surroundings. Without it, the finder patterns cannot be isolated.

Data Encoding

The data within a QR code is binary. Black modules represent a 1 and white modules represent a 0. However, it is not a direct translation. The data is encoded using specific modes depending on the content:

  • Numeric: Most efficient, stores only numbers (0-9).
  • Alphanumeric: Stores numbers, uppercase letters, and limited symbols.
  • Byte: The default for most modern uses, capable of storing ISO-8859-1 characters.
  • Kanji: Designed specifically for Japanese characters.

Did You Know?

A single QR code can store up to 7,089 numeric characters or 4,296 alphanumeric characters. This is why they can hold complex URLs, vCards, or even entire Wi-Fi configurations.

Error Correction: The Secret Weapon

Perhaps the most brilliant feature of a QR code is its resilience. Using Reed-Solomon error correction (the same technology used in CDs and DVDs), a QR code can still be read even if part of it is damaged or obscured.

There are four levels of error correction:

  • Level L (Low): Restores ~7% of data.
  • Level M (Medium): Restores ~15% of data. Standard for marketing.
  • Level Q (Quartile): Restores ~25% of data.
  • Level H (High): Restores ~30% of data.

This is how brands can place logos in the centre of a QR code. They are technically "damaging" the data, but the error correction algorithm fills in the gaps using the redundant information stored elsewhere in the pattern.

The Scanning Process

When your phone camera looks at a QR code, it performs a complex sequence of operations in milliseconds:

  1. Detection: It hunts for the three finder patterns.
  2. Alignment: It calculates the perspective and rotates the image virtually.
  3. Decoding: It reads the format information to understand the error correction level and mask pattern.
  4. Unmasking: It removes the mask pattern (a filter applied to ensure the code has a balance of black and white modules).
  5. Extraction: It reads the data blocks and applies error correction.

Conclusion

The QR code is a masterpiece of efficiency. It is robust, versatile, and requires no power to function. Whether you are using it for inventory tracking or a marketing campaign, understanding the technology below the surface helps you appreciate why it has become the global standard for physical-to-digital linking.