All articles
·5 min read

How QR Codes Work: From Invention to Scan

QR codes appear on restaurant menus, product packaging, event tickets, business cards, and bus stops. Most people know they can be scanned with a phone camera to open a link, but few know what is actually encoded in that grid of black and white squares - or why some QR codes still scan perfectly after being half-covered by a logo or damaged by a scratch.

A Brief History

QR stands for Quick Response. The format was invented in 1994 by Denso Wave, a subsidiary of Toyota, to track vehicle parts moving through the manufacturing process. Traditional one-dimensional barcodes could hold only about 20 alphanumeric characters. QR codes pack information into two dimensions, allowing thousands of characters in a compact square. Crucially, Denso Wave chose not to enforce its patent, making the format royalty-free and enabling universal adoption without licensing barriers.

Anatomy of a QR Code

A QR code has several distinct structural regions. The three large squares in three corners are called finder patterns. They allow scanning software to detect the code's position, size, and orientation in a camera frame, so a QR code can be read from any angle or distance. Alternating black-and-white lines called timing patterns define the cell grid spacing. An alignment pattern in larger QR codes corrects for perspective distortion when the code is photographed at an angle. The remaining cells encode the actual data.

Error Correction - Why Logos Work

QR codes use Reed-Solomon error correction, which adds redundant data so that a partial loss of the code can be recovered. There are four error correction levels:

  • Level L - recovers up to 7% of damaged or obscured cells. Produces the smallest, simplest code.
  • Level M - recovers up to 15% damage. A good default for most uses.
  • Level Q - recovers up to 25% damage. Suitable for industrial printing where physical damage is likely.
  • Level H - recovers up to 30% damage. Allows you to safely overlay a logo or image on up to a third of the code.

This is the reason you can embed a company logo in the centre of a QR code and it still scans. The logo covers some of the data cells, but the error correction redundancy reconstructs the missing information during decoding.

What a QR Code Can Contain

QR codes are not limited to website URLs. They can encode: plain text, phone numbers, email addresses, SMS message drafts, vCard contact information, WiFi credentials (network name, password, and security type), geographic coordinates, and payment information. The maximum capacity at the lowest error correction level is around 4,296 alphanumeric characters or 7,089 numeric digits - sufficient for a URL with a lengthy query string.

How Your Phone Scans Them

When you point your camera at a QR code, image processing software in the camera app continuously analyses frames for finder patterns. Once detected, it calculates the code's orientation and scale, reads the format information cells to determine the error correction level and mask pattern, decodes the data modules using the Reed-Solomon algorithm, applies error correction, and extracts the encoded string. On a modern smartphone, the entire process takes milliseconds.

Use error correction Level M for most QR codes linking to URLs. Only step up to Level H if you need to overlay a logo - it produces a denser, more complex code that is harder to scan from a distance.

Try it yourself - free

Use our QR Code Generator - no account, no sign-up required.

Open Tool