A QR code is a way of writing text so that a camera can read it. That is the whole idea. The text is usually a web address, but it can be a Wi-Fi password, a phone number, a contact card or a plain sentence. The squares are just a very robust font.
Text in squares
Each small square is called a module. A dark module is a 1 and a light module is a 0. Read them in the right order and you get a string of bits, and the bits spell out the text.
The three big squares in the corners are finder patterns. They tell the camera where the code is and which way up it is. That is why a QR code scans upside down or at an angle. Everything else in the grid is either your text or spare data used to repair damage. The anatomy article walks through every part.
A code can be as small as 21 modules across and as large as 177. The size grade is called the version. A short link fits in a version 2 or 3 code. A full contact card needs version 8 or more. More text means finer squares at the same print size, which is why short content scans more easily.
What your phone does with it
The camera app on an iPhone or Android phone looks for finder patterns in every frame. When it sees three, it reads the grid, repairs any modules it misread, and turns the bits back into text. Then it looks at the start of the text and decides what to offer:
- Text starting
https://becomes a link banner. Tap it and the browser opens. - Text starting
WIFI:offers to join the network, with the password already filled in. - Text starting
BEGIN:VCARDoffers to save a new contact. - Text starting
tel:offers to dial the number. - Anything else is shown as plain text.
In practice
The phone shows the link before it opens it. Get into the habit of reading that banner. A code on a parking meter that points at a domain you have never heard of is a reason to stop. The security article explains the common scams.
The code itself does nothing. It does not connect to the internet, does not track you, and cannot run software. It is the phone that acts on the text, and only after you tap.
Static or dynamic, in one paragraph
A static QR code holds the final text. Print it and it works forever, with no account and no server. A dynamic QR code holds a short link to a redirect service instead. Scan it and the service forwards the phone to the real destination, counting the scan on the way. You can change where it points after printing, but it works only while the service runs. The static versus dynamic article covers the trade-off. Most personal uses want static. Most printed campaigns want dynamic, with a plan for what happens when the plan ends.
When to use one
A QR code earns its place when typing would be slow or error-prone and the reader already has a phone in hand:
- A restaurant menu on a table, so nobody types a long address.
- A guest Wi-Fi network, so nobody reads out a 16-character password.
- A business card, so the contact is saved with no typos.
- A poster for an event, pointing at tickets.
- A product label, pointing at instructions or a safety sheet.
It is the wrong tool when the reader is on a phone already (a code on a website is pointless; use a link), when the code will be too small or too far away to scan, or when the content might change and you have chosen a static code.
Three real examples
Every code below is real. Scan any of them and see what your phone offers.
Notice the third one. A contact card is a lot of text, so the grid is much denser. Printed at the same size it will be harder to scan. That is the constant tension in QR design: say less, scan better.
Common mistake
Putting a full address, opening hours and a paragraph of text into the code. The phone shows plain text and nothing is tappable. Put a link in the code and the details on the page it opens.
▸How much text fits
Capacity depends on the version, the error-correction level and the kind of characters. At the common level M, a version 1 code (21 modules) holds 14 bytes, version 3 (29 modules) holds 42, version 10 (57 modules) holds 213 and version 40 (177 modules) holds 2,331. Digits pack tighter, at 34 for version 1 and 5,596 for version 40. Capital letters and a few symbols get their own compact mode too. The versions and capacity article has the full table, and the numbers come from the same encoder that draws every code on this site.
Try it yourself
Build a Wi-Fi or contact code in the payload builder and watch the raw text change as you type. Then scan it with your own phone.