QR codes are on restaurant menus, product packaging, business cards, and billboards. Most people scan them without a second thought, but how do they actually store information? And what makes them work even when part of the code is damaged or covered?

What a QR Code Actually Is

QR stands for Quick Response. It is a two-dimensional barcode, a grid of black and white squares, developed in 1994 by Denso Wave in Japan. The original purpose was tracking automotive parts during manufacturing, where speed of scanning was more important than the limited data capacity of traditional barcodes.

The two-dimensional aspect is what separates QR codes from regular barcodes. A traditional barcode only encodes data horizontally, which limits its capacity. A QR code uses both horizontal and vertical axes, allowing it to store far more information in a similar physical space.

A standard QR code can hold up to around 3KB of data: enough for a URL, a phone number, contact details in vCard format, a Wi-Fi password, or a short plain text message.

How the Data Is Stored

The black and white squares in a QR code are called modules. Their arrangement encodes data using a binary pattern: a dark module represents 1 and a light module represents 0. The pattern is read by a scanner, and the binary sequence is decoded into the original data.

The code is divided into several distinct regions, each serving a specific purpose.

  • Finder patterns: The three large square patterns in three corners of the code. These allow scanners to detect the QR code's position and orientation in an image, even when the code is tilted, rotated, or photographed at an angle.
  • Alignment pattern: A smaller square used in larger QR codes to help correct distortion when the code is printed on a curved surface or photographed from the side.
  • Timing patterns: Alternating black and white strips running between the finder patterns. These help the scanner determine the size of each module and map the grid coordinates correctly.
  • Format information: Strips adjacent to the finder patterns that indicate the error correction level and the masking pattern used. This information is stored twice in different locations for redundancy.
  • Data modules: The remaining squares that store the actual encoded information, arranged in a specific reading order defined by the QR code standard.
  • Error correction modules: A significant portion of the code dedicated to redundancy data that allows the original information to be recovered even when part of the code is unreadable.

Why QR Codes Work When Damaged

The error correction capability is the most impressive feature of QR codes and the least understood. QR codes use Reed-Solomon error correction, a mathematical technique that adds redundant data to the code. When a scanner reads the code, it can use the redundant data to reconstruct any missing or corrupted modules.

There are four error correction levels, each offering a different trade-off between data capacity and resilience:

LevelData recovery capabilityTrade-off
L (Low)Up to 7% of modules recoverableSmallest code, maximum data capacity
M (Medium)Up to 15% of modules recoverableGood balance for most uses
Q (Quartile)Up to 25% of modules recoverableGood for printed materials that may be worn
H (High)Up to 30% of modules recoverableMost resilient, but requires a larger code

This error correction is also why you can place a logo in the centre of a QR code and it still scans correctly. The logo deliberately obscures some modules, but because those modules are covered rather than corrupted, the error correction system treats them as damaged data and recovers the original values. Designers routinely use this technique to create branded QR codes, though going above about 30 percent coverage risks making the code unreadable.

What You Can Encode in a QR Code

QR codes support several data modes, each optimised for different types of content:

  • URLs: the most common use. Scanning opens a website directly in the phone's browser without any typing.
  • Plain text: a message, a coupon code, instructions, or any text up to around 4,000 characters.
  • Contact information: encoded in vCard format, which allows the phone to import the contact directly into the address book with a single tap.
  • Wi-Fi credentials: encodes the network name, password, and security type so the phone can join the network without typing anything.
  • Email or SMS: opens a pre-populated email or text message with the recipient and subject already filled in.
  • Geographic location: encodes a latitude and longitude that opens in the phone's maps application.
  • App store links: links to a specific app in the App Store or Google Play, commonly used in print advertising.

Static vs Dynamic QR Codes

A static QR code encodes the destination directly. Once printed, it cannot be changed. A dynamic QR code encodes a short redirect URL. The destination can be updated without reprinting the code, and most dynamic QR code services provide scan analytics showing how many times the code was scanned, from which locations, and on which devices.

For most personal and small business uses, static QR codes are simpler and free. Dynamic QR codes are useful for marketing campaigns where you want to update the destination after printing, or where you need to track engagement.

Create a Free QR Code

Generate a QR code for any URL, text, Wi-Fi network, or contact details instantly in your browser. No account required, no watermark, no expiry date, and the generated code is yours to use however you like.