QuikbenchQuikbench

How QR Codes Work (and Why They Sometimes Fail to Scan)

QR codes look like a random grid of black and white squares, but every part of that pattern is doing structured work — and understanding roughly how it works explains both why they're so reliable and why they occasionally aren't.

What's actually encoded

A QR code can store several types of data — most commonly a URL, but also plain text, contact details (vCard), Wi-Fi credentials, or even a payment reference, depending on how it was generated. The scanner reads the pattern, decodes the binary data within it, and then hands that data to your device to act on — opening a browser for a URL, for instance. The code itself doesn't "know" what it links to; it's a raw data container the scanning device interprets.

Why QR codes tolerate damage

QR codes include built-in error correction, meaning a meaningful percentage of the code can be obscured, smudged, or damaged and still scan correctly — this is deliberate, not a fortunate side effect. This is also why you can safely place a logo in the center of many QR codes without breaking them: the error correction absorbs that missing data. Higher error-correction levels sacrifice some data capacity for more damage tolerance, which is a trade-off the generator makes when the code is created.

Common reasons a QR code fails to scan

Beyond exceeding the damage tolerance, the most frequent causes are: printing the code too small relative to the scanning distance, insufficient white space (quiet zone) around the edges, low contrast between the code and its background, and glare or curvature on the printed surface (a QR code on a curved cup, for example, can distort beyond what error correction handles). Testing a physical print with a few different phones before mass-printing catches most of these issues early.

Static vs. dynamic QR codes

A static QR code encodes the destination data directly and permanently — if the URL changes, the code is dead and needs to be reprinted. A dynamic QR code instead points to a short redirect URL that you can update later without changing the printed code, at the cost of relying on a third-party redirect service staying online indefinitely. For anything printed permanently (packaging, signage), understand which type you're generating before committing to print.

Try it yourself

Our QR Code Generator creates static QR codes for URLs, text, and more, and our QR Code Scanner reads them straight from your camera — both work entirely in your browser.

This guide covers standard QR code behavior. Some scanning apps apply additional restrictions (like blocking certain URL types) as a security measure, which is outside the QR code standard itself.

Frequently asked questions

The QR code itself is just data — the risk isn't the code being 'hacked' but rather someone printing a malicious QR code (or pasting a sticker over a legitimate one) that points somewhere harmful. Always check the URL preview your scanner shows before opening a link from an unfamiliar QR code.

It depends on the QR code version and error-correction level, but a typical QR code can hold up to a few thousand alphanumeric characters. In practice, most use cases (a URL, contact card, or Wi-Fi credential) use only a small fraction of that capacity.

This is often a contrast or size issue that isn't obvious to the human eye but trips up a camera's scanner — try increasing the print size, ensuring high contrast (dark code on light background), and testing under different lighting before assuming the code itself is broken.