Skip to content
QR Studio

How do QR codes work?

Updated September 2026

A QR code is a grid of black and white squares that encodes text — usually a web link, but it can be Wi-Fi details, a contact card or anything else. A phone camera turns the pattern back into that text and acts on it. Here's what each part does and how the reading happens, in plain terms.

The building blocks: modules

Each little square is called a module. Black means one, white means zero. The QR code is just those ones and zeros arranged in a grid, then grouped into bytes that spell out your text.

A small code is 21×21 modules ("version 1"); they step up in size as you add more data, to 177×177 at the top end ("version 40"). More data means a denser grid, which is why a long URL makes a busier-looking code that needs to be printed larger.

The three big corner squares: finder patterns

The three nested squares in the corners are finder patterns. They're there so the scanner can spot the code in a photo instantly and work out its orientation — which way is up, and whether it's tilted or skewed.

Because there are three, not four, the scanner can always tell which corner is missing and rotate the code the right way round. That's why a QR code scans upside down or at an angle.

The smaller squares and dotted lines

Larger codes also have alignment patterns — smaller nested squares dotted through the grid — that let the scanner correct for a curved or warped surface, like a code on a bottle.

The dotted lines running between the finder patterns are the timing pattern. They're a ruler: the scanner counts them to know exactly how many modules wide the grid is, so it samples each square in the right place.

The plain border: the quiet zone

The empty margin around the code is the quiet zone, and it's part of the spec — at least four modules wide. The scanner uses that clear space to separate the code from whatever is around it. Put text or a coloured panel hard against the edge and many phones can't lock on. It's the most common reason a code doesn't scan.

Why a scuffed code still works: error correction

Every QR code carries redundant data using Reed-Solomon error correction — the same maths used on CDs and in deep-space transmissions. Depending on the level (L, M, Q or H), the code can lose roughly 7% to 30% of its area and still be read.

That's what makes a centre logo possible: it covers modules, but error correction rebuilds them. This tool raises the level to High automatically whenever you add a logo, so the covered part is always recoverable.

What happens the moment you scan

In a fraction of a second the phone: takes a camera frame, turns it to pure black and white, finds the three finder patterns, works out the grid's size and angle from the timing pattern, reads each module as a 1 or 0, runs the error correction to fix any damage, and decodes the bytes into text.

Then it acts on the text by its prefix: https:// opens a browser, WIFI: offers to join a network, BEGIN:VCARD offers to save a contact, tel: starts a call, upi:// opens a payment app. The type of QR code you choose just decides which of those prefixes gets encoded.

Static vs dynamic: what's actually in the code

A static QR code has the real content baked into the pattern — the full URL, the password, the contact details. Nothing sits between the scan and the result, so it works offline where the content allows and it never expires.

A dynamic QR code encodes a short link that redirects through a server. The printed pattern never changes, but you can re-point the destination and count scans — at the cost of depending on that server (and usually a subscription). The static vs dynamic guide covers when each makes sense.

Do QR codes track you?

The code itself can't — it's an image, it does nothing until a camera reads it. A static code just hands your phone some text. A dynamic code's redirect server can log that a scan happened, roughly where and on what device, the same way any link click is logged. Neither can read anything else off your phone.

Frequently asked questions

Who invented the QR code?

Masahiro Hara at Denso Wave, a Toyota subsidiary, in 1994 — originally to track car parts on the assembly line faster than a traditional barcode allowed. Denso Wave holds the trademark but chose not to enforce the patent, which is why QR codes are free to use.

How much data can a QR code hold?

Up to about 4,296 alphanumeric characters or 7,089 digits at the largest size and lowest error correction. In practice you keep it far shorter — a long value makes a dense code that's hard to print small and slow to scan.

Why are the three corners different from the rest?

They're finder patterns. Their fixed nested-square shape lets a scanner locate the code and its orientation in a single pass, from any angle.

Can a QR code contain a virus?

Not directly — it only holds text. The risk is where the link goes: a QR code can point to a malicious site just like any link. Check the address before you act on it, which is why this tool shows you the decoded URL in the reader rather than opening it.

Why does my QR code work even when part of it is covered?

Error correction. The code stores redundant copies of its data, so it can lose up to about 30% of its area — a logo, a scuff, a torn corner — and still be reconstructed.

Do QR codes need the internet?

The scan itself doesn't — reading the pattern is done on the phone. Opening a link needs a connection; joining Wi-Fi or saving a contact from a static code does not.

Static vs dynamic QR codesWhy your QR code isn't scanningQR code best practicesURL QR CodePermanent QR Code