G-20 · Developer · 5 min read

How to make a Wi-Fi QR code guests can scan

Create a QR code that joins your Wi-Fi network in one scan, understand the WIFI payload and escaping, pick an error correction level and print it well.

Updated Uses QR Code Generator, Password Generator
Fig. G-20 · Developer

A Wi-Fi QR code lets a guest join your network by pointing their phone camera at it, with no password to read out or mistype. iPhone and Android cameras both recognise the format. Making one takes a minute; making one that scans reliably from a printed card takes a little more care. This guide covers both, plus what the code contains and what that means for security.

Step by step

  1. Open the QR code generator and choose Wi-Fi as the content type.
  2. Enter the Network name (SSID) exactly as it appears in your phone's Wi-Fi list, including capitals, spaces and punctuation.
  3. Choose the Security type: WPA / WPA2 / WPA3 for almost every modern router, WEP only for very old equipment, or None (open) for a network without a password.
  4. Enter the Password. It stays in your browser and is never sent anywhere.
  5. Tick Hidden network if your router does not broadcast its SSID.
  6. Leave Error correction on M for a code shown on a screen or printed indoors, or choose Q or H for a code that may get scuffed or dirty.
  7. Keep the Margin at 4 modules or more, and keep the default dark-on-light colors unless you have a reason to change them.
  8. Scan the preview with your own phone and confirm it connects. Then download a PNG for screens and documents, or an SVG for print.

What is inside a Wi-Fi QR code

A QR code just stores text. For Wi-Fi, that text follows a convention introduced by the ZXing barcode project and now understood by phone cameras:

WIFI:T:WPA;S:HomeNetwork;P:correct-horse-battery;;
Field Meaning
T: Authentication type: WPA, WEP or nopass
S: The network name (SSID)
P: The password, omitted for open networks
H:true Present only for a hidden network

Each field ends with a semicolon and the whole payload ends with an extra one, which is why it finishes with ;;. WPA here covers WPA2 and, on current phones, WPA3 personal networks, so you rarely need anything else. For an open, hidden network the payload looks like this:

WIFI:T:nopass;S:Lobby;H:true;;

If you want to check what your code contains, use Copy encoded text to copy the exact payload.

Escaping special characters

Because ; separates fields and : separates a field name from its value, those characters inside a network name or password must be escaped with a backslash. The same applies to \, , and ". The generator does this for you. A network called Cafe;Guest with the password p@ss:word"1 becomes:

WIFI:T:WPA;S:Cafe\;Guest;P:p@ss\:word\"1;;

If you build a payload by hand, or with another tool that does not escape these characters, a password containing a semicolon gets cut short and the phone tries to join with the wrong password. That is one of the most common reasons a Wi-Fi code "scans but does not connect". Other characters, including spaces, @, # and accented letters, need no escaping; the text is encoded as UTF-8.

Choosing an error correction level

QR codes include redundant data so they can be read even when part of the code is damaged or covered. There are four levels:

Level Approximate damage it can recover from When to use it
L 7% Screens and clean, controlled environments
M 15% Most uses, including indoor print
Q 25% Codes that may get scratched, wet or partly covered
H 30% Outdoor signs, or a code with a small logo placed over it

Higher levels add more modules (the small squares), and a denser code must be printed larger to scan from the same distance. A typical Wi-Fi payload is short, under a hundred bytes, so even level H produces a manageable code. The generator shows the QR version and module count under the preview, and warns you when content passes 300 bytes, at which point codes become noticeably harder to scan.

Printing tips

  • Size. A common rule of thumb is that a code should be at least a tenth of the scanning distance across. For a card on a table scanned from about 30 cm, 3 cm or more works; for a poster read from across a room, go much larger. Test at the real distance.
  • Use SVG for print. It is a vector file, so it stays sharp at any size. If you use a PNG, set the PNG size high enough that the printer does not have to scale it up.
  • Keep the quiet zone. The blank margin around the code is part of the standard, which asks for at least 4 modules. Do not let a border, text or a background pattern run into it. The generator warns you if the margin is smaller.
  • Dark on light. Many scanners expect dark modules on a light background. Light-on-dark or low-contrast color schemes trigger a warning in the generator because they fail on some phones.
  • Avoid glossy laminate under bright lights; glare can hide part of the code.
  • Add the details in text. Print the network name and password beside the code for laptops and devices without a camera.

Security considerations

A Wi-Fi QR code contains your password in plain text. Anyone who scans it, or photographs it, can read it with any QR app. That is fine for a home or guest network as long as you treat the code like the password itself.

  • Use a guest network if your router supports one, so visitors are kept apart from your own computers, printers and smart home devices.
  • Use a strong password. Since nobody has to type it, it can be long and random. The password generator creates one with your browser's cryptographic random number generator; 16 or more characters is a good minimum. If you prefer to avoid characters that need escaping, untick symbols.
  • Rotate the password when you stop wanting past guests to have access, then print a new code. The old code stops working as soon as the password changes.
  • Do not post the code publicly for a private network, including in photos of your home or office.

Because the code is generated in your browser, the password is never sent to a server, and the code depends on no service: it works for as long as the network name and password stay the same.

To make QR codes for other content, such as a link to a menu, the same generator handles URLs, plain text, email and phone numbers. For a long link, remove what it does not need first: the URL parser shows each part of an address, which makes tracking parameters easy to spot, and a shorter link makes a smaller code that is easier to scan.

FAQ

Common questions.

01Do Wi-Fi QR codes work on both iPhone and Android?

Yes. Current iPhone and Android camera apps recognise the WIFI: format and offer to join the network. Very old phones may need a separate QR scanning app.

02Why does my Wi-Fi QR code scan but not connect?

The most common causes are a mistyped network name or password, the wrong security type, or special characters such as ; or : that were not escaped. Check the encoded text with Copy encoded text, and confirm the SSID matches exactly, including capital letters.

03Does a Wi-Fi QR code expire?

No. The network name and password are stored in the code itself, with no redirect service in between. It keeps working until you change the network's name or password.