How It Ticks

Digital · Exhibit 13

Wi-Fi QR code generator

Type your network name and password, and the code below is ready to print. A guest points a phone camera at it and joins without typing anything. The password stays on this page.

Built in this page: the name and password are not sent anywhere, and nothing is kept after you close the tab. The file you download does hold the password, so keep it where you’d keep the password itself.

Tip: if your router can run a separate guest network, put that one on the fridge, not your main network. Anyone who scans the code can read the password, and changing a guest password later won’t kick your own laptop and TV off the Wi-Fi.

How do I make a QR code for my Wi-Fi?

Copy the network name exactly as your phone shows it in the Wi-Fi list, capitals and spaces included, then the password. Under Security, pick what your router’s settings page shows next to the password. WPA2, or WPA2 and WPA3 together, is the first option; if it says only WPA3 (or WPA3-Personal), pick WPA3 only, because by Android’s source a plain WPA code doesn’t turn on WPA3. Press Hidden network only if the name doesn’t appear in the list at all. Then download the PNG for a phone or a home printer, or the SVG for a print shop.

Office networks that ask for a username as well (WPA2-Enterprise) aren’t covered: ZXing defines extra fields for them, but this page writes only password, WEP and open networks.

Is a Wi-Fi QR code generator safe?

A code like this has to contain your password. What matters is where the password goes while the code is being made, and here it goes nowhere: the page builds the code in your browser. In my test, with every request after page load caught and counted, building the codes for 20 networks and exporting them as SVG and PNG sent nothing. You can check it yourself: once the code has appeared, turn off Wi-Fi and mobile data and change a character of the password in the box above. The code still updates, with no internet at all.

The other half of safety is the printed code. Anyone who can see it can join, and any ordinary QR reader app shows the password as plain text. A code on the hallway wall is a password on the hallway wall. That’s fine for a guest network and less fine for the one your work laptop uses.

Can I make a Wi-Fi QR code without a password?

Yes, for an open network: pick No password and the code holds only the name. If the network has a password, the phone can’t get on without it, so the code has to carry it.

Can my iPhone or Android make the code itself?

Yes, for a network the phone is already on. On iPhone, open the Passwords app, tap Wi-Fi, then the network, and tap Show Network QR Code, “which friends and family can scan to join the network,” in Apple’s words. On Android, open Settings, tap Network & internet, then Internet, tap your network and then Share; Google’s help page says “your device will give you a QR code.” It also notes that some of these steps work only on Android 12 and up, and menu names differ between phone makers.

So if your phone is connected, you can just show your screen. A printed code is for when you won’t be there.

How do phones scan it?

With the ordinary camera: point it at the code and tap the banner that pops up. Apple’s guide says to keep the code inside the camera frame and “tap the link that appears at the bottom of the screen.”

What’s inside a Wi-Fi QR code?

A short line of text, which you can open under “Text inside the code.” For a simple network it looks like WIFI:T:WPA;S:Home;P:your-password;;: T for the security type, S for the name, P for the password, semicolons between them. If your name or password has one of ; , : ” \ % or letters outside English, or you pick WPA3 only, the page shows two versions of that line and puts the one Android reads into the code. You don’t need to do anything with it; the phone reads it from the code.

Two characters cause trouble on older phones whichever line you pick. By the source code, the Settings scanner on Android 15 and older (and on Android 16 unless a newer parser is switched on) splits the line in a simpler way, so a name or password that ends in a backslash or is wrapped in quotes comes out wrong; the page warns you when yours does.

Details: two rules for one line

The older rule comes from ZXing, the open-source barcode library: put a backslash in front of ; , : ” \ inside the name or password. The newer one is in the Wi-Fi Alliance’s WPA3 Specification, version 3.5: write a semicolon and anything outside plain ASCII as a percent code, so ; becomes %3B. This page also writes % itself as %25, so a password like 50%41 can’t be misread.

Android’s open-source code, the scanner in Settings, follows ZXing: it splits on semicolons without a backslash in front, removes the backslashes, and I found no percent decoding in it. Read that way, a network called Кафе in the Wi-Fi Alliance line would come out as %D0%9A%D0%B0%D1%84%D0%B5. Camera apps such as Google Lens are closed source, so I can’t say what they do with it, and I haven’t tried either line on a phone.

For WPA3-only networks the two lines always differ. Android writes T:SAE, a value that isn’t in ZXing’s own list; the specification writes T:WPA plus R:1. Android 15 and later read both, while Android 14's Settings scanner ignores R:1. I haven’t checked how an iPhone reads SAE, so scan the printed code with one before you hang it up.

Two smaller differences: Android doesn’t put a backslash before a quote when it writes the line (harmless, since it removes backslashes when reading), and ZXing asks for a name that looks like a hex number, such as ABCD, to be wrapped in quotes. This page doesn’t do that, because the older Android parser would then drop the quotes as part of the format; the catch is that ZXing’s own scanner app may then read a name like ABCD as hex.

How big should I print it?

A Wi-Fi code is short: 29 squares across for a typical name and password in my tests, 25 for the shortest, 45 for the longest. DENSO WAVE, which invented the QR code, works through an example: at 400 dpi with 4 printer dots per square, a 29 by 29 code is 7.4 mm wide, or 9.4 mm with the white border it requires. That’s a worked example for a printer, not a size for scanning across a room. I haven’t measured scanning distance, so print one, keep the white border, and scan it from where your guests will stand. For codes that hold a link instead, use the QR code generator.

How I tested it

I tested the text inside the codes, not joining a network on a real phone. My 20 test networks have every awkward character in the name and password: semicolons, commas, colons, quotes, a trailing backslash, Cyrillic, Chinese, emoji, plus a 32-character name, a 63-character password, a hidden network and a WEP one. Each was written both ways, except WEP, which the Wi-Fi Alliance spec doesn’t cover, and exported as SVG and PNG: 78 files. Two decoders I didn’t write, jsQR and ZXing, read all 78 back byte for byte. Then I ran the default lines through a copy of the older Android parser (Android 14 and 15), written from its source: 17 of 20 came back right, and the 3 that didn’t are the ones the page warns about.

QR Code is a registered trademark of DENSO WAVE INCORPORATED.

Sources