What Information Can a QR Code Contain?
By ScanHatch · Published · 4 min read
Every QR code contains text, nothing more. What makes one code open a website and another join a WiFi network is the format of that text. Phones recognise a handful of standard formats and offer a matching action.
Below are the formats that work on today's phones, what each looks like inside the code, and what doesn't fit in a QR code at all.
It's always text
A QR code stores a sequence of characters. When a phone scans it, the camera app looks at the start of that text. If it begins with https://, it's a link; if it begins with WIFI:, it's a network; if it begins with BEGIN:VCARD, it's a contact. Anything it doesn't recognise is shown as plain text.
That also means you can see exactly what a code does before acting on it, by reading the raw text with a QR decoder.
Formats phones recognise
| Content | What the text looks like | What the phone offers |
|---|---|---|
| Web link | https://example.com/menu | Open the page in the browser |
| WiFi network | WIFI:T:WPA;S:Example Guest;P:correct-horse-42;; | Join the network |
| Contact (vCard) | BEGIN:VCARD … END:VCARD with name, phone, email | Add to contacts |
| Contact (MeCard) | MECARD:N:Doe,Alex;TEL:+447700900123;; | Add to contacts |
mailto:hello@example.com?subject=Order%2042 | Start an email draft | |
| Phone call | tel:+442079460123 | Open the dialler |
| Text message | SMSTO:+447700900123:JOIN | Start a text message |
| Location | geo:51.5055,-0.0754 or a Google Maps link | Open a map (support for geo: varies) |
| Calendar event | BEGIN:VEVENT … END:VEVENT with title and times | Add to calendar (support varies) |
| Plain text | Any other text | Show the text |
The QR Code Generator builds each of these for you, including the escaping rules that trip people up, such as a semicolon inside a WiFi password. Guides for the most common types: WiFi, website links, contact cards, email, phone, SMS, WhatsApp and Google Maps.
Links that open apps
Many “app” QR codes are ordinary web links that an app has registered to handle. A WhatsApp code contains https://wa.me/447700900123, which opens WhatsApp if it's installed and WhatsApp's website if not. Google Maps, app store and social-profile codes work the same way. Because they're normal links, they degrade gracefully on phones without the app.
Formats with patchy support
Calendar events and geo: locations are standard formats, but not every camera app acts on them: some just show the text. For locations, a Google Maps link is the more dependable choice. For events, test on both iPhone and Android before printing.
How much can a QR code hold?
The absolute maximum is 2,953 bytes of text (or 7,089 digits) in the largest version at the lowest error correction. In practice the limit is how dense a code you're willing to print and scan. A few rules of thumb:
- Under about 100 characters: small, open codes that scan instantly. Most links, WiFi codes and phone numbers are here.
- A few hundred characters, such as a full vCard with an address: the code gets noticeably denser and needs printing larger.
- Over 1,000 characters: technically possible, but hard to scan with a phone. Put the content on a web page and link to it.
Non-English text uses more space: accented letters take two bytes in UTF-8, and many Asian scripts and emoji take three or four.
What a QR code can't contain
- Files, PDFs, images, audio or video. Upload them somewhere and encode the link.
- Anything that changes after printing, such as a price or an opening time. The code shows what was encoded on the day it was made.
- Hidden or executable content. A code can't install software or run anything on its own; at most it contains a link that the phone asks you about.
- Secrets. Anything in a code, WiFi passwords included, can be read by anyone who scans it.
Checking a code's content
Before printing a batch, it's worth confirming the content is well-formed: a WiFi code with a missing network name, or a link with a space in it, will scan but won't work. The QR Validator decodes an image and checks the content against the rules for its type.
Frequently asked questions
Can a QR code contain a PDF?
Not the file itself. Upload the PDF to a website or cloud storage and make a QR code for its link.
Can a QR code contain a virus?
A QR code only contains text. The risk is a link that leads to a harmful website, so check where a link goes before opening it.
Can I put two things in one QR code, like a link and a WiFi login?
No. Phones act on one format per code. Use two codes, or link to a page that holds both.