Skip to the tool workspace
Browser 123

How-to QR codes

How to make a Wi-Fi QR code

The text a Wi-Fi QR code holds, the characters that need escaping, and how to make one guests can scan to join without typing the password.

A Wi-Fi QR code is a short line of text in a fixed format. A phone that scans it offers to join the network, so your guests never have to type the password.

What the code holds

WIFI:T:WPA;S:Home;P:correct horse;;
Part Meaning
T: Security: WPA, WEP or nopass for an open network
S: The network name (SSID)
P: The password; left out for an open network
H:true Only for a hidden network
;; The end

The characters \ ; , : " have a meaning in this format, so in a name or a password each one gets a backslash in front. A network called Cafe;Bar with the password p:ss becomes:

WIFI:T:WPA;S:Cafe\;Bar;P:p\:ss;;

Forget an escape and the phone reads a different password, which is the most common reason a Wi-Fi code "does not work".

On the command line

The direct wayqrencodeLinux · macOS · Windows (WSL)

Put the whole line in single quotes, so the shell leaves the semicolons and backslashes alone:

qrencode -o wifi.png -s 10 'WIFI:T:WPA;S:Cafe\;Bar;P:p\:ss;;'
zbarimg --raw wifi.png

zbarimg prints the line back exactly, escapes included.

Put it on the wall
  1. Make the code with the exact name and password, upper and lower case included.
  2. Scan it with your own phone first, with Wi-Fi off, and check it joins.
  3. Print it with a short label, such as "Wi-Fi", so people know to scan it.
  4. When you change the password, make a new code.

Questions people ask

Is it safe to put my Wi-Fi password in a QR code?

The code holds the password as plain text, so anyone who scans it knows it. Treat a printed code like a written-down password: put it where your guests are, not in a window.

My network name has a semicolon in it. Does that work?

Yes, as long as it is escaped with a backslash. The characters \ ; , : and " all need one; the editor escapes them for you.

Which security type do I pick?

WPA for a network with a password, the type the format uses for WPA and WPA2. WEP only for very old equipment, and nopass for an open network.

Tools in this guide

Everything runs on your device

All guides

/
123 items
Runs in your browser·Your files stay on this device
Out0 B
Ready—