Skip to content
ScanHatch

QR Codes

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

Common QR code content formats (all example data is fictional)
ContentWhat the text looks likeWhat the phone offers
Web linkhttps://example.com/menuOpen the page in the browser
WiFi networkWIFI:T:WPA;S:Example Guest;P:correct-horse-42;;Join the network
Contact (vCard)BEGIN:VCARD … END:VCARD with name, phone, emailAdd to contacts
Contact (MeCard)MECARD:N:Doe,Alex;TEL:+447700900123;;Add to contacts
Emailmailto:hello@example.com?subject=Order%2042Start an email draft
Phone calltel:+442079460123Open the dialler
Text messageSMSTO:+447700900123:JOINStart a text message
Locationgeo:51.5055,-0.0754 or a Google Maps linkOpen a map (support for geo: varies)
Calendar eventBEGIN:VEVENT … END:VEVENT with title and timesAdd to calendar (support varies)
Plain textAny other textShow 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.

  • QR Codes

    What Is a QR Code? How QR Codes Work

    What a QR code is, where it came from, and how a phone turns the squares back into a link or text: finder patterns, versions, masking and error correction.

    · 6 min read

  • How-To Guides

    How to Create a QR Code (That Actually Scans)

    A step-by-step guide to making a QR code that scans: choosing the content, keeping it readable, picking the file format and size, and testing before print.

    · 4 min read