A Wi-Fi QR code is a QR code that holds a short piece of text, such as WIFI:T:WPA;S:Cafe Guest;P:sunny-tables-42;;. When someone scans it, their phone offers to join the network without anyone typing the password.
The Wi-Fi QR code format
The format comes from the open-source ZXing barcode project, and the camera apps on many phones and most scanner apps read it. It starts with WIFI:, lists fields as key:value separated by semicolons, and ends with two semicolons.
| Field | Meaning | Example |
|---|---|---|
T: |
Security type: WPA (also for WPA2), WEP, or nopass for an open network |
T:WPA |
S: |
Network name (SSID), exactly as the router shows it | S:Cafe Guest |
P: |
Password; leave it out for an open network | P:sunny-tables-42 |
H: |
true if the network is hidden; leave it out otherwise |
H:true |
The order of the fields doesn’t matter to most readers, but T, S, P, H is the common one. Network names and passwords are case-sensitive, so copy them exactly.
Escaping special characters
Five characters have a meaning in the format: backslash, semicolon, comma, colon and double quote. When one of them is part of the network name or the password, put a backslash in front of it:
| In the name or password | Write it as |
|---|---|
; |
\; |
, |
\, |
: |
\: |
" |
\" |
\ |
\\ |
Spaces, apostrophes and other characters need nothing. Two worked examples:
- Network
Joe's;Place, passwordpa:ss,wordbecomesWIFI:T:WPA;S:Joe's\;Place;P:pa\:ss\,word;; - Network
Studio 4, passwordback\slash"quotebecomesWIFI:T:WPA;S:Studio 4;P:back\\slash\"quote;;
If a hand-made code doesn’t join, check the escaping first: without the backslash, the phone reads the password only up to the semicolon.
More examples
- WPA or WPA2 (most home and office networks):
WIFI:T:WPA;S:Home Net;P:correct-horse-battery;; - Hidden network:
WIFI:T:WPA;S:Back Office;P:k7-river-lamp;H:true;; - Open network, no password:
WIFI:T:nopass;S:Library Free WiFi;; - Old WEP network:
WIFI:T:WEP;S:Old Router;P:12345abcde;;(WEP is easy to break; switch the router to WPA2 or WPA3 if you can)
A note on WPA3
The Wi-Fi Alliance’s WPA3 specification describes the same WIFI: format. It uses WPA as the type for networks with a password and adds an optional R: field (transition disable), which tells phones not to fall back to older security. Some apps write T:SAE for WPA3 instead, and not every phone reads that. If your router runs in WPA2/WPA3 mixed mode, T:WPA is the widest choice. In either case, test the code with an older phone as well as a new one.
Make the code
On qrapp.app
The generator on this site takes any text, so you can type the WIFI: line yourself:
- Write the line as shown above, with backslashes before any special characters.
- Paste it into the generator’s text box. The preview updates as you type.
- Scan the preview with your phone to check that it offers to join the right network.
- Download a PNG or SVG.
The code is made in your browser and nothing is uploaded, which matters when the text contains your password. It’s a static code: the details are inside it, it doesn’t expire, and it can’t be changed after printing. See static vs dynamic QR codes for what that means.
With an app
Many scanner apps have a Wi-Fi type that writes the text for you. In QR App, go to Create, pick Wi-Fi, type the network name and password, and choose the security type (Open, WEP, WPA, WPA2 or WPA3) and whether the network is hidden. The app does the escaping, warns when a password is too short for its type, and can generate a random password if you’re setting up a new guest network.
Guest networks and privacy
Anyone who sees the code can join the network, and anyone who scans it with a scanner app can read the password. Treat a printed Wi-Fi code like the password written on a card.
- Use a guest network if your router has one. Guests get internet access without reaching your computers, printers or smart-home devices.
- Change the password from time to time, then print a new code. The old one stops working.
- Keep it out of photos. A code on a wall shows up in pictures people share.
Printing tips
- Print the network name next to the code, so people know which network they’re joining and can type it if their phone doesn’t scan.
- A code on a table card or a fridge is read from close up; about 3 cm wide is usually enough. The guide to QR code size for printing has the details.
- Keep dark modules on a light background, with a clear margin around the code.
- Laminate or frame codes in busy places so they don’t get scuffed.
- Test the printed code before putting it up, with an iPhone and an Android phone if you can.