QR Codes Explained: How They Work and When to Use Them

16 May 2026 · 4 min read

The QR code was invented in 1994 by Denso Wave, a Toyota subsidiary, specifically to track car parts through manufacturing lines. Standard barcodes could hold only about 20 digits; assembly operations needed part numbers, supplier codes, and batch identifiers simultaneously. The solution was to encode data in two dimensions at once, creating a format that could hold roughly 100 times more information in a similar physical space. Three decades later, the same technology is on restaurant tables, event tickets, and bathroom walls.

What a QR code actually is

A QR code is a two-dimensional matrix barcode — a grid of black and white squares (called modules) arranged so that the pattern can be read in any orientation. The three large square markers at three corners are finder patterns: they let a camera determine the code's position and angle regardless of how it is held. The smaller squares distributed across the grid encode the actual data, while timing patterns and format information tell the reader how to interpret the rest.

Data is encoded redundantly across the grid using Reed-Solomon error correction, which means a partially damaged or obscured code can still be read correctly. This is the same error correction technique used in CDs and QR codes worn away by weather or covered by a logo.

What they can encode

The format is agnostic about content — it encodes a string of data, and what that string means depends on how a reader interprets it. The most common use cases are:

Error correction and density

QR codes offer four error correction levels, designated L, M, Q, and H. Level L can recover from 7% damage; Level H can recover from 30%. The trade-off is density: higher correction requires more modules to store the same data, making the code physically larger or visually busier. For most practical purposes, Level M (15% recovery) is the right default — robust enough for real-world conditions, without making the code unnecessarily complex. Use Level H only if you plan to overlay a logo in the centre of the code, which deliberately occludes part of the data.

Size, contrast, and the quiet zone

Three physical rules determine whether a QR code scans reliably in practice. First, minimum size: for a smartphone camera at arm's length, the code needs to be at least 2.5 cm × 2.5 cm. Smaller than this, the camera cannot resolve the individual modules. Second, contrast: dark modules on a light background. Inverted codes (light on dark) cause failures with many readers; coloured modules on a coloured background are even less reliable. Third, the quiet zone: the QR spec requires a border of at least four modules of empty space around the entire code. Printing to the edge of a panel, or placing a code too close to surrounding graphics, breaks this requirement.

Static vs dynamic codes

A static QR code bakes its data in permanently at the moment of creation. The URL, text, or Wi-Fi credentials it encodes cannot be changed. This is how the tool on this site works: the code is generated entirely in your browser, contains exactly what you typed, and requires no account, no server, and no ongoing subscription. It will continue to work indefinitely.

Dynamic QR codes redirect through an intermediary server. The code itself contains only a short tracking URL; the actual destination can be updated after printing. This is useful for print campaigns where the destination might change — but it requires an active subscription with the provider, and the code stops working if the service shuts down or your subscription lapses.

Common mistakes

← All guides Generate a QR code →