WiFi QR Code: How to Make a QR Code for Your WiFi Network
Make a WiFi QR code by encoding WIFI:T:WPA;S:name;P:password;; so guests can join by scanning. Covers the format, escaping, iPhone and Android, and safety.
Updated
A WiFi QR code is an ordinary QR code containing one line of text in a special format: WIFI:T:WPA;S:YourNetwork;P:YourPassword;;. When a phone camera reads it, the phone offers to join that network without anyone typing the password. To make one, write that line with your own network name and password, and paste it into the QR Code Generator.
The WIFI: payload format
The text starts with WIFI:, followed by fields separated by semicolons, and ends with two semicolons. Each field is a letter, a colon and a value.
| Field | Meaning | Values |
|---|---|---|
T | Security type | WPA, WEP or nopass |
S | Network name (SSID) | Exactly as it appears in your WiFi list, including capitals and spaces |
P | Password | Leave the field out for open networks |
H | Hidden network | true if the network does not broadcast its name. Otherwise leave it out |
A few rules:
- The network name and password are case sensitive.
HomeNetandhomenetare different networks. - Use
WPAfor networks secured with WPA or WPA2, which covers most home routers, and for routers in mixed WPA2 and WPA3 mode. - The order of the fields does not matter, but
T,S,Pis the convention. - Do not add spaces around the colons or semicolons. A space after
S:becomes part of the network name. - The final
;;is one semicolon closing the last field and one closing the whole entry. Keep both.
Worked examples
A typical home or guest network:
WIFI:T:WPA;S:Cafe Guest;P:latte-2026;;
An open network with no password:
WIFI:T:nopass;S:Library Free WiFi;;
A hidden network:
WIFI:T:WPA;S:Office-5G;P:correct horse 42;H:true;;
Escaping special characters
Five characters have a meaning inside the format, so they must be escaped with a backslash when they appear in your network name or password:
| Character | Write it as |
|---|---|
| Backslash | \\ |
| Semicolon | \; |
| Comma | \, |
| Colon | \: |
| Double quote | \" |
Examples:
- Network name
Smith;HomebecomesS:Smith\;Home - Password
pa:ss,wordbecomesP:pa\:ss\,word - Password
back\slashbecomesP:back\\slash
Other symbols, such as @, !, #, $ and spaces, are written as they are. Unescaped semicolons are the most common reason a WiFi code is rejected: the phone thinks the password ends at the semicolon and tries to join with half of it.
Make the code step by step
The QR Code Generator has a single text box and no separate WiFi form, so you build the line yourself and paste it in.
- Find your exact network name and password. They are usually on the router label or in the router's admin page.
- Write the line in a text editor, starting from
WIFI:T:WPA;S:YourNetwork;P:YourPassword;;. Replace the name and password, and escape any of the five special characters. - Open the QR Code Generator, clear the URL or Text box, and paste your line.
- Set error correction. The generator starts on H, which makes a denser pattern. For a code shown on a screen or printed cleanly, M is enough and gives larger squares.
- Choose the Classic color preset for black on white, or any combination with a dark foreground on a light background.
- Download PNG for a screen or a small print, or SVG for anything larger.
- Test it. Scan with a phone that has never joined the network, or tell your phone to forget the network first.
For scale, the Cafe Guest example above is 38 characters and produces a 29 by 29 module code at level M, which scans easily from a table card. For the reasons behind module counts and error correction, see how QR codes work.
How to scan a WiFi QR code
On an iPhone or iPad:
- Open the Camera app and point it at the code.
- Tap the banner that offers to join the network.
- Confirm with Join.
This is built in from iOS 11 onward.
On Android:
- Open the camera app and point it at the code. Most recent phones recognize it and show a prompt to connect. If nothing happens, use Google Lens.
- Or open the WiFi settings and tap the QR icon beside Add network, available on Android 10 and later. Menu names vary by manufacturer.
- Tap Connect.
Laptops are less consistent. Many have no built-in WiFi QR scanning, so keep the password written somewhere for those guests.
Safety
A WiFi QR code is the password in another form. It is not encrypted, and any QR reader will show the text.
- Anyone who can see or photograph the code can read the password. Do not post a picture of it online, and remember that it may appear in the background of guests' photos.
- Use a guest network. Most routers can run a separate guest network that keeps visitors away from your computers, printers and smart home devices. Put that network in the code, not your main one.
- Place the code inside the premises, not in a window facing the street.
- Use a strong password anyway. A QR code removes the typing, so there is no reason to keep it short. The Password Generator can make one, and how to create a strong password explains what makes it hard to guess.
- Rotate the password from time to time, then print a new code. The old code stops working the moment the password changes. See do QR codes expire.
- Avoid open networks. Use
nopassonly when the network truly has no password. - Treat unknown WiFi codes with care. Joining a stranger's network lets its owner observe your unencrypted traffic. Check the network name in the prompt before you connect.
If the code does not work
- The phone says the password is wrong: check capitals, and check for an unescaped
;,,,:or\. - The phone shows the text but offers no join button: the line does not start with
WIFI:in capitals, or a field letter is mistyped. - The network is not found: the name in
S:does not match exactly, or the network is hidden andH:trueis missing. - The camera will not focus: the code is too small or too dense. Lower the error correction level and print it larger.
- It works on some phones only: switch to plain black on white, with square dots and corners.
Try it
Write your line as WIFI:T:WPA;S:YourNetwork;P:YourPassword;;, paste it into the QR Code Generator, download the PNG or SVG, and scan it once yourself before you print it for guests.