Wi-Fi QR code generator

Put your network name and password into a code, and a guest joins by pointing a camera at it. No dictating a password across a room, and no password written on a whiteboard. The code is built in the page, so the password is never sent anywhere.

What the code actually contains

A Wi-Fi code is one line of text in a grammar phone camera apps recognize:

Escaping, and the bug it avoids

The grammar uses semicolons to separate fields and colons to separate a field from its value, so a password containing either character will break the line unless it is escaped. A generator that pastes the password in raw produces a code that looks perfect and joins nothing, and the failure is invisible until somebody tries it. Every backslash, semicolon, comma, colon and double quote in the name and the password is escaped with a backslash here.

There is a second rule that is easier to miss. An SSID made entirely of hex digits with an even number of them can be read as a hex-encoded name rather than a literal one, so a network called 1234ABCD could send a phone looking for something else. Names like that are wrapped in double quotes, which is what the grammar provides for marking a name as literal.

If you are testing a scanner rather than joining a network, those two rules are the interesting cases: a password of a;b\c", an SSID of DEADBEEF, and a name with a trailing space are the inputs that separate a correct reader from one that splits on the first semicolon it sees.

Choosing the security type

WPA covers WPA, WPA2 and WPA3 — phones treat the single WPA value as the modern case, and there is no separate WPA3 code. Pick WPA unless your network is genuinely older than that.

WEP is obsolete and is here for equipment that still requires it. A WEP key is 5, 10, 13 or 26 characters, and a key of any other length is rejected before the code is made, because a wrong-length key produces a code that cannot work.

Open networks use nopass, and the password field is left out of the payload entirely rather than sent empty. An empty password field is a common way for a code to fail on a network that has no password at all.

Which phones can read it

The iPhone camera app has joined networks from a QR code since iOS 11, and Android has done it from the built-in camera since Android 10. On older Android the system settings offer the same thing under Wi-Fi sharing, and a scanner app covers the rest.

What the phone does is offer to join, not join silently. The person scanning sees the network name and confirms, which is the behavior you want on a code stuck to a wall in a public room.

The password is readable, and that changes where the code goes

The password is in the code as text. Anyone who can photograph the code has the password, and can keep it after they leave — a QR code is a convenient way to share a password, not a way to protect one. Any scanner app will display the decoded line.

So put the code on the guest network rather than the one your printers and file shares are on, and treat a printed code the way you would treat the password written on a card: fine on a cafe table, not fine facing a window onto the street. If the code goes somewhere semi-public, rotating the guest password on a schedule and reprinting is a small cost.

Where a Wi-Fi code earns its place

Questions

Does it work on an iPhone?

Yes, from the camera app on iOS 11 and later. The phone shows the network name and asks you to confirm before joining.

Is my Wi-Fi password sent to your server?

No. The code is built by JavaScript in your browser, and the password is never transmitted, logged or stored. Nothing about the network leaves the page.

My password has a semicolon and other generators produce a code that fails. Why?

The Wi-Fi grammar separates fields with semicolons, so an unescaped one ends the field early. Every backslash, semicolon, comma, colon and quote is escaped here, so passwords containing them work.

Is there a separate option for WPA3?

No, and none is needed. Phones read the single WPA value as covering WPA2 and WPA3.

Can somebody read the password out of the code?

Yes. Any scanner app shows the decoded text, password included. Use the guest network and treat the printed code as you would a written password.

Will it work on a hidden network?

Yes, with the hidden option checked, which adds the flag telling the phone to look for a network that does not broadcast its name. Leave it off otherwise, since it slows the join down.

Make a Wi-Fi QR code →

Make a different kind of code

Invalid QR code generator · Damaged QR code generator · QR code testing tool · Free QR code generator · QR code generator for a URL · vCard QR code generator · QR code generator · Bulk QR code generator

Open the generator → · All formats