Skip to main content
snaptools

Guide

How to make a QR code (Wi-Fi, contact card, and more)

What a QR code actually encodes, the exact payload format behind a Wi-Fi, vCard, or WhatsApp code, and which type to use for what, with a generator built in.

SnapTools Editorial ·

A QR code is not a picture of the thing it represents; it is a grid encoding a text string, and everything useful about it comes from the exact format of that string. A plain URL payload just opens a page; switch to a Wi-Fi or contact-card payload and the format changes completely, which is what actually tells a phone to join a network or save a contact instead of opening a browser.

A plain URL or text code

The simplest case: the payload is the literal text or URL, nothing wrapped around it. A camera app reads the string, recognizes https:// at the front, and offers to open it like any other link. There is no size limit beyond what fits in the QR grid, but longer payloads produce a denser code that needs more room to scan reliably (see "why does my QR code fail to scan" below).

A Wi-Fi code

Wi-Fi credentials use a small, well-defined scheme most modern phones understand out of the box (iOS 11+, Android 10+):

WIFI:T:WPA;S:Zaraar-Office;P:hunter2;;

T is the security type (WPA, WEP, or nopass for an open network), S is the network name, P is the password. The trailing ;; closes the record. The part generators most often get wrong is escaping: if the network name or password itself contains a semicolon, comma, quote, or backslash, those characters have to be backslash-escaped or the payload gets misread partway through: a network called Cafe;Bar has to become Cafe\;Bar inside the payload, for example.

Because the password sits in that string as plain text, a Wi-Fi QR code is exactly as sensitive as the password itself; see the FAQ below before pinning one up somewhere public.

A contact card (vCard) code

A contact card QR code embeds a vCard, the same format address books have exchanged for decades:

BEGIN:VCARD
VERSION:3.0
N:Lovelace;Ada;;;
FN:Ada Lovelace
ORG:Analytical\, Ltd
TITLE:Engineer
TEL;TYPE=CELL:+44 20 7946 0958
EMAIL;TYPE=INTERNET:ada@example.com
END:VCARD

N is the structured name (last;first;;;), FN is the display name, and each field after that is optional. Two details break more vCard QR codes than anything else: the spec requires CRLF (\r\n) line endings, not plain \n, and commas inside a field value (an organization name like Analytical, Ltd) need escaping to \, or they get parsed as a field separator. The more fields you add, the denser the resulting code: a vCard with a photo, notes, and several numbers can get dense enough to need a noticeably larger printed size to stay scannable.

A WhatsApp chat code

This one isn't a special QR scheme at all; it's a normal https://wa.me/ link that happens to deep-link into WhatsApp:

https://wa.me/447700900123?text=Hi%21%20got%20a%20question

The number after wa.me/ is the country code plus the number, digits only: no +, no spaces, no leading zero after the country code. An optional ?text= parameter pre-fills the opening message, percent-encoded the same way any URL query string is.

Static vs. dynamic QR codes

Everything above produces a static code: the full payload is baked directly into the image, it works offline forever, and nothing about it can be changed or tracked after the fact. Some paid QR services instead generate a dynamic code: a short URL they control that redirects to your real destination, which lets them swap the destination later or log every scan. That's a genuine trade-off, not a strictly better option: a dynamic code depends on that service staying online indefinitely, where a static one just... works, for as long as QR readers exist.

Which type to use

  • Sharing a link, menu, or profile → a plain URL code.
  • Letting guests join Wi-Fi without typing a password → a Wi-Fi code.
  • Handing out contact details at an event → a vCard code.
  • Getting people straight into a WhatsApp chat or support line → a WhatsApp code.

Frequently asked questions

Text and nothing more. A QR code is a way of encoding a string so a camera can read it back quickly; the image itself has no "understanding" of Wi-Fi, contacts, or chat apps. What happens after the scan depends entirely on the format of that text: a phone recognizes prefixes like WIFI: or BEGIN:VCARD and reacts accordingly, the same way a browser reacts to https://.
Yes, effectively. The password sits in the payload as plain text (WIFI:T:WPA;S:...;P:yourpassword;;), just encoded into a scannable shape rather than encrypted. Treat a printed Wi-Fi QR code exactly like you would a sticky note with the password written on it; fine for a home entryway or a shop counter, not for a network you want to control who joins.
Yes, as long as it is a properly formatted vCard (version 3.0, CRLF line endings). Both platforms read the BEGIN:VCARD block natively through the camera app and offer to save it as a new contact. The most common cause of a vCard that "does nothing" when scanned is a generator that uses plain \n line breaks instead of \r\n, which some phones fail to parse.
No. The underlying wa.me link needs the full number with country code and no leading +, spaces, or punctuation (e.g. 447700900123, not +44 7700 900123). WhatsApp resolves the link from digits alone, so anything else in the number makes the link invalid or points at the wrong contact.
Almost always density or contrast, not the payload. Long payloads (a vCard with a photo, notes, and multiple numbers; a very long URL) force a higher-resolution QR grid that needs to be printed or displayed larger to stay scannable. Low contrast between the code and its background, or a code shrunk below roughly 2cm for a typical phone-length scan, causes the same failure. Shortening the payload or enlarging the code fixes most scan failures.

Related