Skip to content
QR Codes Productivity

How QR Codes Actually Work

By ToolzHive · · 4 min read

A QR code looks like random noise, but every one of those black and white squares is doing a job. Understanding the structure explains why QR codes survive being crumpled, partly covered or scanned at an angle — and why some are denser than others.

What a QR code actually stores

A QR ("Quick Response") code is just a way of encoding text as a two-dimensional grid. That text can be a web address, a Wi-Fi network, a phone number, a payment string or plain words. Your phone's camera reads the pattern, decodes it back into text, and acts on it — usually by offering to open a link.

Crucially, the code itself holds the data. There is no central database being looked up. A URL QR code contains the whole URL; scanning it offline would still reveal the address. That is why a QR code on a poster keeps working forever, and also why you should be wary of codes from untrusted sources — they can point anywhere.

The anatomy of the pattern

Several parts of the grid are structural, not data:

  • The three big squares in the corners are finder patterns. They let a scanner locate the code and work out its orientation, which is why you can scan one upside down.
  • The smaller square near the fourth corner is an alignment pattern, helping the scanner correct for angle and curve.
  • The dotted lines between the finders are timing patterns that map out the grid spacing.
  • The remaining area carries the encoded data and its error correction.

Why QR codes are so robust

The clever part is error correction. QR codes use Reed–Solomon coding, the same maths that protects CDs and deep-space transmissions. Extra, redundant data is baked in so the code can be fully recovered even when part of it is unreadable.

There are four error-correction levels — L, M, Q and H — recovering roughly 7%, 15%, 25% and 30% of the code respectively. This is the trick behind QR codes with a logo in the middle: the logo covers real modules, but a high error-correction level reconstructs the missing data. The cost is density — more error correction means more squares for the same text.

Why some codes are denser

The amount of data decides the version (grid size), which ranges from 21×21 modules up to 177×177. A short URL fits in a sparse, easy-to-scan code. A long URL with tracking parameters fills a dense one that is harder to scan from a distance or print small.

Two practical takeaways follow:

  • Keep the content short. A shorter URL means a sparser, more reliable code. Strip unnecessary tracking parameters, or use a short link.
  • Print with quiet space. QR codes need a clear margin (the "quiet zone") around them. Crowding the edges stops scanners locking on.

Beyond URLs: Wi-Fi and more

QR codes can encode structured text that apps recognise. A Wi-Fi QR code uses a specific format listing the network name, security type and password, so a guest can join without typing anything. The same idea powers contact cards, calendar events and payment codes — the format is a convention both sides agree on.

Scanning and creating them safely

On the creating side, generate codes at a decent size, test them on more than one phone, and keep contrast high — dark on light, never light on dark, which many scanners reject. On the scanning side, always check the URL your phone previews before tapping; a QR code hides its destination by nature, which makes it a favourite for phishing.

Generating a QR code — for a link, a Wi-Fi network or a plain message — and scanning one back to verify it both run entirely in your browser, so nothing you encode leaves your device. Create the code, scan your own result to confirm it decodes to exactly what you intended, and only then print it.

Tools mentioned in this guide

Accessibility Menu

Personalize your experience. Open with Ctrl+U (Option+U on Mac). Preferences stay in this browser when storage is available.

Move / Hide Widget

Restore at any time with Ctrl+U (Option+U on Mac).

Accessibility statement and help