How to share your Wi-Fi with a QR code

Enter your network name, password and security type into a Wi-Fi QR code generator, save the image, and guests can scan it with their phone camera to join without typing anything. The code holds a short line of text in a standard format that phones recognise as network settings. The Wi-Fi QR code generator I built makes the code on your device, and it never sends or stores your password.

Making the code

You need three details, exactly as your router has them:

  • Network name (SSID), which is case-sensitive and up to 32 characters. If your router broadcasts separate 2.4 GHz and 5 GHz names, pick one.
  • Password. WPA passwords are 8 to 63 characters, and every space and capital letter matters.
  • Security type. WPA covers WPA, WPA2 and the mixed WPA2/WPA3 mode most home routers use; WEP is for very old routers; choose the open option for a network with no password.

Tick the hidden-network box only if your router does not broadcast its name. The code redraws as you type, the PNG download is ready immediately, and reloading the page clears everything, because the password is deliberately not remembered anywhere.

What is inside the code

A Wi-Fi QR code is just text. For a WPA network called MyHome with the password sunflower42 it reads:

WIFI:T:WPA;S:MyHome;P:sunflower42;;

T is the security type (WPA, WEP or nopass), S the network name and P the password; an optional H:true marks a hidden network, and the string ends with two semicolons. Because semicolons, commas, colons, double quotes and backslashes have special meaning, they are escaped with a backslash, so a password of pa;ss is written as P:pa\;ss. The generator handles that escaping for you. The format was popularised by the open-source ZXing barcode project and is now what phone cameras look for. The general QR code generator has a Wi-Fi preset too, and How QR codes actually work explains how text becomes the black and white squares.

Scanning it on a phone

On an iPhone, the built-in Camera app has recognised Wi-Fi codes since iOS 11: point it at the code and tap the prompt to join. On Android, most camera apps and Google Lens do the same, and Android 10 and later can also scan a code from the Wi-Fi settings screen and show a QR code for the network you are connected to. Laptops are the awkward case: most cannot join from a QR code, so print the name and password underneath as well.

If a scan finds the network but will not connect, the usual culprits are a typo or wrong capitalisation in the name or password, the wrong security type, or the hidden flag set when it should not be. Some older phones also cannot join networks set to WPA3 only. The QR scanner decodes your code back to text so you can check exactly what it contains.

Security and privacy

The password sits in the code as plain text, so anyone who can scan or photograph it can read it with any QR reader. Treat a printed code like a written-down password. If your router offers a guest network, use that for the code: guests get internet access while staying separated from your own computers, printers and smart devices. Because nobody has to type it, the guest password can be long and random, which the password generator makes easy. And when you change the password, old codes simply stop working, so reprint them.

Printing and placing it

Print in plain black on white, on matt paper if you can, since glare stops cameras reading the code. A code a few centimetres across scans easily from arm's length; make it bigger if people will scan it from further away. Keep the white margin around it, called the quiet zone, which the generator includes, and do not crop into it. Add a line saying what it is, such as "Scan to join the guest Wi-Fi", and the network name and password in text for laptops. A frame in the guest room or a card on the fridge works well; a window facing the street does not. The generator uses medium error correction, so a small scuff or crease will not stop it scanning.

Sources and further reading

The claims in this guide rest on these references, which were checked when the guide was last updated. Spotted an error? The contact page says how to report it.

  1. Barcode Contents: Wi-Fi network config โ€” ZXing project wiki
  2. QR code โ€” Wikipedia (error correction levels)
  3. Wi-Fi Protected Access โ€” Wikipedia

Try the tool

Frequently asked questions

Do iPhones scan Wi-Fi QR codes?

Yes. The built-in Camera app has recognised Wi-Fi QR codes since iOS 11; point it at the code and tap the prompt to join.

Is sharing Wi-Fi with a QR code safe?

It is as safe as telling someone the password, because the password is stored in the code as plain text. Use a guest network for visitors.

What does a Wi-Fi QR code contain?

A short text string such as WIFI:T:WPA;S:network;P:password;; with the security type, network name and password.

Do I need a new code if I change my Wi-Fi password?

Yes. The password is stored in the code itself, so old codes stop working once it changes.