guide · privacy
What a QR Code Actually Contains, and What Scanning Does
Updated November 10, 2026 · 8 min read
direct answer
A QR code contains text — one string, at most 2,953 bytes in the largest version — and nothing else. It cannot hold a file, run a program, or record who read it. What it usually holds is a web address, but it can equally be a Wi-Fi join request with the password in plain text, a contact card, a pre-filled SMS including its body, a dialler number, map coordinates or a bitcoin payment request. Your camera decodes the string and offers it to whichever app owns that format; that app then asks you to press connect, save, call or send. The risk is not in the code, it is that the string stays invisible until a machine reads it for you.
The squares are a font, not a file. Decoded, a QR code is one string of at most a few thousand characters — so the interesting question is never the pattern, it is what your device does when an app hands it that string. Here is every format, in the open.
That string can contain anything the caller put there, including a vCard or a Wi-Fi credential with a name in it. The Text Anonymizer reads pasted payload text and replaces the personal data inside it without opening or requesting anything.
A symbol is a string
A QR code is not a link to something and not a program. It is a block of characters printed as squares, and that is the whole of it. The specification — ISO/IEC 18004 — defines how bits become modules, error-correction codewords and a version number; it says nothing about destinations, companies or files. Decode the symbol and you get a plain string back, the same kind of string you could type. The black-and-white pattern is a font. Reading it is transcription, not execution.
That distinction carries almost all of the practical safety advice, because it means the only interesting question about a QR code is what the string says and what your device does when it receives it. Nothing about the symbol itself can be infected, revoked or out of date, and nothing about it stays hidden once it is decoded.
How much text fits in one
QR symbols come in 40 versions, from a 21×21 grid to 177×177, and each version trades capacity against error correction. At the largest size with the lowest correction level — version 40-L — the ceiling is 7,089 numeric characters, 4,296 alphanumeric, 2,953 bytes of binary data, or 1,817 Kanji. A web address uses a fraction of one small version, which is why the codes on menus and parking meters are sparse and the ones stuffed with a whole contact card are dense and hard to photograph.
The practical consequence: a QR code cannot contain a document, an executable or an image. It is far too small. The most malware-shaped thing that fits is a short URL plus a path, and anything bad that follows has to be downloaded from somewhere after the string is handed to an application. The string is the match, not the fire.
The payload formats your phone already understands
Plenty of codes hold a plain web address, but a large number do not. Camera apps and scanners recognise a handful of leading tokens and route the string to whichever app owns that format. The list below is the de-facto set, documented by the ZXing project, the decoder inside a great many Android and iOS applications.
| Starts with | What the string is | What your device does | What to look for |
|---|---|---|---|
https:// | A web address | Shows a preview card, or opens the browser | The registered name inside it — not the words in front of it |
WIFI:T:WPA;S:…;P:…; | A request to join a wireless network | Offers to connect, sometimes without asking again | The password is written in the clear |
MECARD:N:Last,First;TEL:…;; | A contact card, the Japanese format | Offers to save a contact | A phone number or email you did not choose to keep |
BEGIN:VCARD | A contact card, the vCard format | Offers to save a contact | Its URL; and EMAIL; lines |
SMSTO:+44…:message | A pre-filled text | Opens Messages with the body already typed | A link inside a message you did not write |
sms:+44…?body=… | A pre-filled text, the Android spelling | The same, through the ?body= parameter | The body is percent-encoded, so %40 is an @ |
TEL:+44… | A telephone number | Opens the dialler with the number entered | Rate-charged numbers; the prefix is not necessarily your country |
GEO:51.5,-0.12 | Coordinates | Opens a map at that pin | A pin is a point, not a building |
bitcoin:ADDR?amount=… | A payment request, from BIP 21 | Opens a wallet with the amount filled in | An address you cannot verify by eye |
mailto:[email protected] | An email to compose | Opens your mail app with recipient and subject set | The body= parameter, which can carry a link |
javascript: / data: | Inline code or an inline file | Browsers refuse these from an address bar; a sloppy in-app viewer may not | Anything. A code containing these was not made for a menu. |
Read the third column down and the pattern is obvious: none of these is “install”. Each one is an offer to a different application, and each application puts something in front of you before it acts — a connect button, a save button, a dialler with the number already typed and a green call button that is very easy to hit.
The Wi-Fi code is the one that leaks
WIFI:T:WPA;S:FreeShopGuest;P:summer2024;; is not a token or a certificate. It is the network name and the passphrase as ordinary text, encoded once into squares. Anyone who photographs the sign has the password, in every copy of that poster, forever, whether or not they were ever a customer. The format also has an escape rule — the characters ; : , " and the backslash have to be preceded by a backslash, and T:nopass means an open network — which tells you the same thing again: this is a text format with delimiters, not a credential system.
That is why the guest-network code on a café wall is a weak idea even when the network it joins is legitimate. The passphrase cannot be unprinted. Rotate it when the poster comes down, and if the same SSID also serves your office, put the guests somewhere else.
What a QR code cannot do
- It cannot run anything. There is no execution mode in the format. Every action is taken by an app on your device that chose to act on the string.
- It cannot see you. A printed symbol holds no connection back. Nothing about the code knows who read it or when.
- It cannot hide a second payload. One symbol decodes to one string. Layers inside that string — an encoded link inside a
body=parameter — are still characters, and they are visible once decoded. - It cannot carry a file. 2,953 bytes at the very largest. Anything described as a code containing an invoice PDF is a code containing a link to one.
- It cannot expire. The string is fixed at print time; it is the server behind a short link that changes its answer.
What a QR code can do that a typed address cannot
One thing, and it is the whole reason the NCSC wrote about QR codes and their real risk in February 2024: a code makes the destination invisible at the moment you decide. On screen you can hover, read, or paste a link into something. On a wall you cannot see the characters, so the decision gets made by a camera instead of by you. The FTC’s consumer alert on QR codes describes the same thing in practice — stickers laid over parking meters, codes on packages nobody ordered — and its advice is to inspect the URL before you open it.
The threat model is physical and it is cheap. Nobody has to break the code, replace the menu, or compromise the restaurant. They print a square, stick it over the square that was already there, and the code you were about to scan is now a different one. Nothing about the paper warns you. The second weakness is the one every emailed link has: the address it holds can name a brand anywhere except the single position that means anything.
How to read a code without obeying it
- Cover the demand, find the string. The goal is the characters, not the destination.
- Use a scanner that shows text and stops. The stock camera app on both platforms shows a preview card and waits for a tap rather than opening the page; if yours goes straight into a browser, that is the setting to change.
- Copy rather than follow. Android’s preview and most readers offer a copy action; on desktop, decode to text and paste it somewhere you can read it in full.
- Then read the host. Text after
//, stopping at the first/,?or#. If there is an@inside it, everything before that@is a username, not a site. The party you are dealing with is the label left of the public suffix, plus the suffix. - Decide from the registered name, not from the words in front of it and not from how well the poster was printed.
The Suspicious Link Checker takes the copied string — a URL or any of the payload formats in the table above — splits it into labelled parts, and flags brand words that are not in the registered slot, second links hidden inside parameters, non-Latin look-alikes, and Wi-Fi codes carrying a passphrase. It parses characters on your device. It does not open the address, so the read costs you nothing and tells the other side nothing.
paste the text from a code
Suspicious Link Checker
Copied a QR payload, or were sent a link you do not want to open? Paste it here. Every part of it gets a label, every trick in the string gets a row, and nothing is fetched.
Read the stringWhy this site does not decode the image
There is a browser API for it — BarcodeDetector — and this page does not use it, deliberately. It is not a Baseline feature: Chromium ships it, Safari does not implement it and neither does Firefox, which means an upload-and-decode box would work on some of your devices and fail quietly on others. The other reason is the one that matters more here. Decoding an image means handling a file you did not choose to hand to a website, and everything on this site is built so that nothing leaves your device. Type or paste the characters instead. If all you have is a photograph of a code, your camera app will turn it into text in about a second and you can paste that.
What the string still cannot tell you
Decoding gets you the destination, and the destination gets you the party you are dealing with. It does not get you a verdict. A parking code can hold a perfectly correct address for the council’s genuine payment provider and still be the wrong code to scan, because it is stuck over the one that was there first. The characters cannot see the wall. So the honest checklist has two halves — what the string says, and whether you expected this code to exist where you found it — and only the first half can be done for you.
faq
Frequently Asked Questions
Whether a code can install something, whether anyone can tell that you read it, whether codes expire, and whether Android and iPhone behave differently.
Can a QR code give you a virus?
Not by itself. The format has no execution mode and, at the largest size, holds only 2,953 bytes, which is nowhere near enough to carry a program. What a code can carry is an address, and the damage happens afterwards: the string opens a page that pushes a download, imitates a login form, or offers a file your browser marks as dangerous. So the accurate answer is that a QR code cannot infect you but can be the only thing standing between you and a page that will, which is why reading the text before following it is the whole defence.
Can someone see what QR code I scanned?
The code cannot. A printed symbol is a one-way string with no connection back to whoever printed it, so it has no way to learn that you read it, when, or from what device. The destination can, once you go there: a web page sees your IP address, your browser and the fact that it was opened, and a shortened link records the same thing at the moment it redirects. That is an argument for reading the string before opening it, not an argument that scanning in the abstract is being reported to somebody.
Do QR codes expire?
No. The string is fixed the moment the symbol is printed and stays identical in every copy forever. What changes is what is on the other end. A code holding a direct address to a page keeps working as long as that page exists and the domain is renewed; a code holding a short link keeps working only while the shortener resolves it, and its owner can repoint it at something else at any time without touching the paper. So a five-year-old code on a poster is not stale, it is unedited, and the kind you cannot predict is the kind that goes through a redirect.
Does scanning on Android work differently than on iPhone?
In shape, no; in detail, yes. The stock camera app on both platforms decodes the string, shows a preview and waits for you to tap it rather than opening it for you, and both recognise the same de-facto payload formats. The differences are in what happens next: iOS routes a WIFI: join request through a prompt while Android may connect straight to a network it has seen before, the copy action appears in different places, and third-party readers on either platform can skip the preview and open into a browser at once. The setting worth checking on both is the one that auto-opens results.