How to make a Wi-Fi QR code: the format, special characters and a printable card
Make a QR code that joins your Wi-Fi: the WIFI: text format, escaping special characters, hidden networks, WPA3, guest-network safety and a printable card.
Key takeaways
- The code is plain text in a fixed format: T for security, S for network name, P for password, H for hidden, ending with two semicolons.
- The characters backslash, semicolon, comma, double quote and colon must be escaped with a backslash, or the code joins the wrong network or none.
- Use T:WPA for WPA2 and mixed WPA2/WPA3 networks; Android's own code also understands T:SAE for WPA3, but test every phone type you expect.
- The password sits in the code as readable text, so put a guest network on the card, not your main one.
- A static code is the right choice for Wi-Fi: it works before the phone is online and nothing can switch it off.
Reading out a long Wi-Fi password to every guest gets old fast. A Wi-Fi QR code lets people join with one scan: the phone reads the network name and password and offers to connect. This guide explains exactly what goes inside the code, the special characters that break hand-made codes, what to do about hidden and WPA3 networks, and how to print a card that works the first time.
What is inside a Wi-Fi QR code?
A Wi-Fi QR code holds a single line of text in a format first documented by the open-source ZXing barcode project, which phone cameras now read. For a network called Cafe Guest with the password sunny-day-42, it is:
WIFI:T:WPA;S:Cafe Guest;P:sunny-day-42;;
ZXing describes the format as modeled on the MECARD contact format. Each field is a letter, a colon and a value, followed by a semicolon, and the whole line ends with two semicolons. The order of the fields does not matter.
| Field | Meaning | Values |
|---|---|---|
T | Authentication type | WPA (personal WPA networks), WEP, WPA2-EAP, or nopass (or left out) for an open network |
S | Network name (SSID) | Required, exactly as broadcast |
P | Password | Left out when T is nopass |
H | Hidden network | true when the router does not broadcast its name |
E, A, I, PH2 | Enterprise settings | Only for WPA2-EAP: EAP method, anonymous identity, identity, phase 2 method |
When a phone camera reads this text, it shows a prompt to join the network. Apple’s iOS 11 developer talk described exactly that: tapping the Wi-Fi banner prompts the user to connect.
Wi-Fi QR codes are always static: the network details are inside the pattern itself. That is a good thing here, because a guest who scans the code is not online yet and cannot reach a redirect service.
How do you make a Wi-Fi QR code, step by step?
- Check the network name. Copy it exactly as it appears in your phone’s Wi-Fi list. Capitals, spaces and apostrophes all count.
- Pick the security type. For almost every modern router choose WPA (it covers WPA2 and mixed WPA2/WPA3 networks); WEP only if the router says WEP; none for an open network.
- Enter the password, and tick hidden network if the name is not broadcast.
- Generate the code. Our free Wi-Fi QR code generator builds the text, escapes special characters for you, and runs entirely in your browser, so the password is never sent anywhere.
- Download PNG for screens, SVG for print, or the printable card.
- Test with a phone that has never joined the network, ideally one iPhone and one Android. A phone that already knows the network proves nothing.
Which special characters need escaping?
This is where hand-made codes fail. Some characters have a meaning in the format, so a value that contains them must mark them with a backslash. ZXing lists five: backslash \, semicolon ;, comma ,, double quote " and colon :.
| Your value | Written inside the code |
|---|---|
Password pa;ss | P:pa\;ss; |
Password a:b,c | P:a\:b\,c; |
Network Joe's "Cafe" | S:Joe's \"Cafe\"; |
Password ending in a backslash key\ | P:key\\; |
Without escaping, a semicolon in the password ends the field early, and the phone tries to join with half a password.
ZXing notes one more edge case: if the network name or password is made only of characters that could be read as a hexadecimal number, such as ABCD or 1234, wrap it in double quotes (P:"1234";) so it is read as text. A generator that follows the format handles both rules automatically.
Does a Wi-Fi QR code work with WPA3?
Mostly, yes, with care. The format predates WPA3. Since then, the Wi-Fi Alliance has registered a wifi URI scheme with IANA that refers to section 7 of its WPA3 specification; the registration says the format is designed to stay compatible with the widely used existing format while adding WPA3 features.
In practice:
- Mixed WPA2/WPA3 networks: use
T:WPA. That is what most generators, including ours, write for WPA, WPA2 and WPA3 personal networks. - WPA3-only networks: Android’s own Settings code, in the Android Open Source Project, lists
SAE(the WPA3 personal method) as a security value next toWPA,WEPandnopass. We could not find current Apple documentation on how iPhones treatT:SAEor a WPA3-only network, so test on an iPhone before printing. If it fails, the simplest fix is to run the guest network in WPA2/WPA3 mixed mode. - Enterprise networks that ask for a username (WPA2-Enterprise) have their own fields in the format, but phone support varies and our generator does not cover them.
Can a Wi-Fi QR code join a hidden network?
The format supports hidden networks with H:true. Phone support has been the weak point: in Apple’s 2017 developer talk introducing QR scanning on iOS 11, Apple said hidden SSIDs were not supported. That talk is old, and behavior may have changed, but it is a good reason to test. For a guest network, the easy answer is to broadcast its name: the card already shows the name and password to anyone who reads it, so hiding the name gains you nothing there.

Is it safe to put your Wi-Fi password in a QR code?
The password is stored as plain text. Anyone who scans the code with a reader app, or photographs it, can read it. Treat the printed card like the password itself:
- Use a guest network. Most routers can run a separate guest network that cannot reach your computers, printers, cameras or tills. Put that one on the card.
- Rotate the password every few months, and print a new card when you do; the old one stops working the moment the password changes.
- Keep cards indoors, where only guests and customers see them.
- Never print your main network. If someone photographs the card, they should only ever get guest access.
How do you print a Wi-Fi card that scans first time?
A good card has four elements:
- A heading: “Free Wi-Fi: scan to join” tells people what the code does. NN/g’s guidance is to explain what a code is for, because a bare code gives no reason to scan.
- The code itself, dark on a light background.
- The network name and password in text, for laptops and older phones that cannot scan.
- A blank margin around the code. DENSO WAVE’s specification requires a four-module margin on every side.
Size it for where people will hold their phones. NN/g recommends at least 2 x 2 cm and about 1 cm of width for each 10 cm of distance. A table card read from 30 to 40 cm needs a code of 3 to 4 cm; a sign at reception read from 1 m needs about 10 cm. The QR code size guide has the full chart.

What if the Wi-Fi code does not work?
| Symptom | Likely cause | Fix |
|---|---|---|
| Camera does not react | Low contrast, small code, no margin | Reprint larger, dark on light, with a margin |
| Prompt appears, joining fails | Wrong password or unescaped character | Check the password; regenerate with a generator that escapes |
| Joins on Android, fails on iPhone | Hidden network or WPA3-only setting | Broadcast the name; try mixed WPA2/WPA3 |
| Worked last month, not now | Password changed | Print a new code |
| Joins the wrong network | Network name typed differently | Copy the name exactly from the phone’s list |
For problems that are not Wi-Fi specific, the QR code not working guide has a full fault-finding flow, and how to scan a QR code covers each phone’s scanner.
Static or dynamic for Wi-Fi?
For most marketing codes we recommend dynamic codes you can edit and track. Wi-Fi is the exception. A static code goes straight to the phone’s join prompt and works with no internet connection. Make BN Shortener Wi-Fi codes static (untick Dynamic): only a static code makes the phone offer to join the network. Use the static code on the card; save dynamic codes for menus, posters and pages you may change. The static vs dynamic QR codes guide explains the difference.
Wi-Fi QR code checklist
- Network name copied exactly from a phone’s Wi-Fi list.
- Security type WPA for WPA2 and mixed networks.
- Special characters escaped (the generator does it).
- Guest network, not the main one.
- Code at least 3 cm on a table card, dark on light, with a margin.
- Network name and password printed in text beside the code.
- Tested on an iPhone and an Android phone that never joined before.
- A reminder to reprint whenever the password changes.
Start free
Make the Wi-Fi card now with our free Wi-Fi QR code generator, and if you also want codes you can edit and track for menus and posters, start free at b1.lc. The free plan includes 5 dynamic QR codes; Pro is $15 a month ($144 a year) and Business $49 a month ($468 a year). For contact details on a card, try the vCard QR code generator.
Sources
- Barcode Contents: Wi-Fi network config, ZXing project wiki (GitHub), undated. Checked 2026-10-23.
- Uniform Resource Identifier scheme registration: wifi (provisional), IANA, 2020-12-15. Checked 2026-10-23.
- WifiQrCode.java, Android Settings app (AOSP mirror), Android Open Source Project, undated. Checked 2026-10-23.
- QR Code Recognition on iOS 11, Apple Developer (video), 2017. Checked 2026-10-23.
- Points for setting QR Code symbol size (module size and margin), DENSO WAVE (QRcode.com), undated. Checked 2026-10-23.
- 13 QR-Code Usability Guidelines, Nielsen Norman Group, 2024-02-09. Checked 2026-10-23.