DevTools Hub
All articles

Guides

Wi-Fi QR Codes: How They Work and How to Make One Safely

The text format hidden inside a Wi-Fi QR code, how to print one for guests, and the security trade-offs to think about first.

By DevTools Hub Team · · 5 min read

Reading out a 20-character Wi-Fi password to every guest, letter by letter, gets old quickly. A Wi-Fi QR code solves it: guests point their phone camera at it and tap "Join". Here's how these codes work under the hood, how to make a reliable one, and what to consider before sticking one on the wall.

What's inside a Wi-Fi QR code

A QR code is simply a way of storing text in a grid of squares. A Wi-Fi QR code stores text in a special format that phone cameras recognize:

WIFI:T:WPA;S:CoffeeShop Guest;P:correct-horse-battery;H:false;;
  • T is the security type: WPA (also used for WPA2 and WPA3), WEP, or nopass for an open network.
  • S is the network name (SSID), exactly as it appears in your Wi-Fi list.
  • P is the password.
  • H is true if the network is hidden and doesn't broadcast its name.

If the name or password contains a special character such as ;, ,, :, \ or ", it must be escaped with a backslash, or the phone will read the wrong password. A good generator does this for you; a surprising number don't, which is the most common reason a Wi-Fi QR code "doesn't work".

Both iOS (since iOS 11) and Android (since Android 10) can join networks from these codes using the built-in camera, without any extra app.

Making a code that scans every time

  1. Copy the network name exactly. SSIDs are case-sensitive, and a trailing space counts.
  2. Pick the right security type. Almost every modern router uses WPA2 or WPA3, so choose WPA.
  3. Test before printing. Scan it with at least one iPhone and one Android phone, ideally ones that haven't joined the network before.
  4. Print it large enough. At least 3 × 3 cm for a code people scan up close; bigger for a sign on the wall. Keep a white margin (the "quiet zone") around it.
  5. Add a fallback. Print the network name, and optionally the password, under the code for laptops and older devices that can't scan.

Security: what to think about first

A Wi-Fi QR code contains your password in plain text. Anyone who photographs it can read it with any QR app. That is fine for many situations, but it's worth being deliberate:

  • Use a guest network. Most routers can create a separate guest network that gives internet access but isolates visitors from your computers, printers and smart-home devices. Put that network in the QR code, never your main one.
  • Rotate the password occasionally, especially for a business, and reprint the code. Old printouts and photos stop working immediately.
  • Generate it offline. Some online QR generators send your input to their server, and some create "dynamic" codes that route through their service. For Wi-Fi codes, use a generator that works in your browser and produces a static code, so your password never leaves your device.
  • Be wary of codes you scan. The flip side: a malicious QR sticker placed over a real one could connect your phone to an attacker's network. In public places, check the network name your phone offers to join before accepting.

Where Wi-Fi QR codes work well

  • A framed card in the living room or guest bedroom.
  • Table tents in cafés and restaurants, next to the menu QR code.
  • Meeting rooms and co-working spaces, rotated monthly.
  • Vacation rentals, in the welcome guide alongside checkout instructions.
  • Event badges or conference programs for a temporary network.

Beyond Wi-Fi

The same idea works for other kinds of data. A QR code can hold a plain URL, a contact card (vCard), a pre-filled email or SMS, or calendar event details. For anything printed, prefer a short URL that you control: if the destination changes later, you can update a redirect on your own site instead of reprinting.

Ready to make one? Our QR Code Generator has a dedicated Wi-Fi mode that handles escaping correctly, uses high error correction for reliable scanning, and runs entirely in your browser.

Keep reading