How to make a WiFi QR code for guests

Guests point their phone camera at a code on the table or wall and join your network without typing the password. This guide explains what is inside that code, how to print it so it scans, and what a QR code cannot protect.

Updated

What a WiFi QR code contains

A WiFi QR code is plain text in a fixed layout. The camera apps on Android and on iPhone (since iOS 11) recognize text that starts with WIFI: and offer to join the network. For a coffee shop called Harbor it looks like this:

WIFI:T:WPA;S:Harbor;P:latte-2026\;guest;;

The format comes from ZXing, an open-source barcode scanner project. The Wi-Fi Alliance later wrote it into the WPA3 specification and registered the wifi URI scheme with IANA in 2020, keeping it compatible with the existing format. Each field ends with a semicolon, field order doesn't matter, and the whole string ends with two semicolons.

FieldMeaningExample
TSecurity type: WPA, WEP, nopassT:WPA
SNetwork name (SSID), requiredS:Harbor
PPassword, ignored for nopassP:latte-2026
HHidden networkH:true

Characters that need escaping

Because a semicolon ends a field, the password latte-2026;guest would be read as latte-2026 if written as is. ZXing specifies that five characters must be preceded by a backslash: \ ; , " :. That is the \; in the example above. If you build the text yourself in a generic QR generator, add those backslashes by hand. Case, spaces and hyphens all count, so copy the name and password exactly as they appear in the router settings.

WPA2, WPA3, WEP and open networks

The T field describes how you log in, not which WPA version the router runs. T:WPA covers WPA and WPA2 Personal, and the swift.id tool writes it for WPA3 as well. One difference is worth knowing: when Android Settings shares a WPA3-Personal network, it writes T:SAE. If your router runs WPA3 only, rather than WPA2/WPA3 transition mode, scan the code with a few Android phones and iPhones before printing. A device without WPA3 support can't join a WPA3-only network whatever the code says; transition mode on the router lets both kinds in.

WEP has been insecure for a long time and only matters for very old routers. For an open network, T:nopass means the P field is not used.

Hidden networks

A network with a hidden name doesn't appear in the WiFi list, so the phone has to look for it by name. H:true tells the phone the network is hidden; Android saves it as a hidden SSID. Without that flag the code still scans, but the phone may fail to find the network. Hiding the name is no substitute for a strong password.

Print size and scanning distance

The example text is 41 bytes. At Medium (M) error correction the QR Code Generator uses version 3, which is 29 × 29 modules (the smallest squares in the pattern), plus a 4-module blank border on each side. What matters in print is the width of one module: the code's width divided by 29.

Code widthModule widthRough scan distance
1.2 in (3 cm)1.0 mm1 ft (30 cm)
2 in (5 cm)1.7 mm1.6 ft (50 cm)
4 in (10 cm)3.4 mm3.3 ft (1 m)
8 in (20 cm)6.9 mm6.6 ft (2 m)

The distance column uses a rough rule of thumb common among printers: a code scans from about 10 times its width. It is not part of the QR standard, and the real figure depends on the camera, the light and the contrast. Print one copy, then scan it from where guests actually sit or stand. A longer name or password adds bytes and can push the code to a higher version: named Harbor Cafe, the text grows to 46 bytes and moves to version 4, so each module gets smaller at the same printed width.

Table stickers that get wiped and splashed last longer with High (Q) or Maximum (H) error correction. For the example text, Q moves the code up to version 4 (33 modules) and H to version 5 (37 modules). Keep the blank border white, and use SVG for print so the edges stay sharp at any size.

Print the network name and password in plain text under the code as well. Laptops and some tablets have no camera app that reads QR codes, and their owners will type the password anyway.

What a WiFi QR code can't do

  • Hide the password. The content is plain text. Any scanner app that shows raw QR content displays the P: field, and anyone who photographs the sign can pass the password on. Assume everyone who has seen the code knows the password.
  • Expire. A QR code has no validity period. To revoke access, change the password on the router and print a new code; the old one stops working at that moment.
  • Limit what guests can reach. A connected guest is on the same network as your printer, NAS or security cameras unless the router separates them. If your router has a guest network feature, make the code for that network only, with its own long password; the strong password guide explains why length matters more than symbols.

Making a WiFi QR code on swift.id

  1. Open the QR Code Generator and choose Wi-Fi.
  2. Enter the Network name (SSID) and Wi-Fi password exactly as set on the router. Escaping is done for you.
  3. Pick the Security: WPA / WPA2 / WPA3 for almost every router, No password for an open network. Tick Hidden network if the SSID is not broadcast.
  4. Choose the Error correction, then scan the on-screen preview with a phone that has never joined that network. A phone that already knows the network proves nothing.
  5. Press Download SVG for print, or Download PNG (256 to 2048 pixels) to send in a chat or drop into a document.

Questions

Why doesn't the phone connect after scanning?
The usual causes: upper and lowercase letters in the name or password don't match the router, the security type is wrong, or the phone still has an old password saved for that network. Forget the network on the phone and scan again. On a WPA3-only router, older phones without WPA3 support can't join at all.
Can one code cover both the 2.4 GHz and 5 GHz networks?
One code holds one network name. If the router uses the same name on both bands, one code is enough and the phone picks the band. If the names differ, for example with a 5G suffix, make two codes.
Can guests see the password in the code?
Yes. Any scanner app that shows the raw content reveals it. Use a guest network with its own password, and change that password when you need to cut off access.
Does a WiFi QR code from swift.id expire?
No. The network name and password are stored in the image itself, not behind a redirect server. The code stops working only if the name or password on the router changes.