How QR codes actually work

A QR code is a grid of black and white squares — modules — that encodes text as binary. Three big corner squares tell the camera where the code is and which way up; smaller marker patterns calibrate the grid; the rest is your data interleaved with recovery information. Nothing about it requires a network, an account or a server — which is why static codes can be free forever.

  1. 1

    The camera locates the three corner markers

    Those large squares-within-squares have a distinctive 1:1:3:1:1 ratio that's easy to find at any angle and any scale. Three of them define position, rotation and perspective.

  2. 2

    It maps the grid and reads the modules

    Timing patterns (the alternating rows and columns) and alignment marks let the reader work out the grid size and compensate for distortion. Then it walks a fixed zigzag path, reading each module as a bit.

  3. 3

    Error correction repairs anything damaged

    The bits include redundant data computed with Reed–Solomon codes — the same maths that lets a scratched CD play. Up to 30% of the modules can be missing or wrong and the original text is still recovered exactly.

Try it now

Send anyone straight to a web page with a single scan.

Fill in the fields to encode your own content

Waiting for content

Free, no sign-up, no watermark. Your code never leaves this browser.

What's actually stored

Just text — a URL, Wi-Fi credentials, a contact card, up to about 4,000 characters. The encoding has modes for numbers, alphanumeric and binary data. More characters means more modules: codes come in 40 'versions', from 21×21 up to 177×177. Watch the generator as you type a longer URL and you'll see it climb the versions in real time.

This is the deep reason behind the most repeated advice on this site: shorter content makes a sparser pattern, and a sparser pattern scans faster, smaller and in worse conditions.

Why the design rules are what they are

Every rule you've read about QR codes follows from the reading process. Dark-on-light: cameras threshold the image into black and white, so contrast is everything. The quiet zone: the reader finds the corner markers by scanning for their pattern, which fails if other shapes touch them. Size rules: each module must cover enough camera pixels to be measured reliably. No cropping the corners: the finder patterns are how reading begins at all.

Error correction is why styling is possible at all: a centre logo or a fancy dot shape 'damages' the code in ways the redundancy can absorb — up to its budget.

Static, dynamic and why it matters

Because the pattern is the data, a static QR code needs no infrastructure — the reason everything on this site works offline, privately and permanently. 'Dynamic' codes store a URL to a redirect service instead of the final destination; that indirection is what allows editing and tracking, and what creates the subscription, the privacy questions and the expiry when the service ends. Same format, different content — all the difference in the world.

Mistakes to avoid

  • Dense codes (long content) are the root cause of most scanning problems — shorten first.
  • Error correction has a budget; logos, styling and damage all draw from the same account.
  • A QR code is only as trustworthy as whoever printed it — read decoded URLs before opening them.

Common questions

Why are there three big squares?

They're position markers. Cameras use their distinctive pattern to find the code and compute its orientation, scale and perspective.

How much can a QR code store?

Up to about 4,000 characters of text in the largest version — though codes over a few hundred characters print badly, so URLs dominate in practice.

Do QR codes need the internet?

Not to be created or decoded — the data is in the pattern. Internet is only needed if the content is a link you then open.

Who owns the QR code standard?

It was created by Denso Wave in 1994 and released freely; the patents are unenforced by design, which is why anyone can generate codes without a licence.