How to make a Wi-Fi QR code for guests
Development · 5 min read
A Wi-Fi QR code lets a guest join your network by scanning a code instead of typing a long, fiddly password on a phone keyboard. It works because of a simple, standardised text format that phones recognise automatically, and getting the details right means the difference between a code that connects instantly and one that quietly fails.
How the WIFI: format works
Modern phones recognise a specific text pattern inside a QR code and offer to join the network directly rather than opening a browser or a text viewer. That pattern looks like WIFI:S:NetworkName;T:WPA;P:Password;;
Each letter is a field: S is the network name (SSID), T is the security type, P is the password, and H is an optional flag for hidden networks. The double semicolon at the end closes the string and is easy to forget if you are building one by hand.
Because this is just a specific text format, any qr-code tool that lets you enter free text can generate a working Wi-Fi code, as long as you get the field names, punctuation, and order right.
Picking the right security type
The T field tells the phone what kind of security your network uses. WPA covers both WPA and WPA2, which is what the overwhelming majority of home and small office routers use today, so it is the correct choice almost universally.
WEP is an old, insecure standard that should not be in use on any modern network; if your router still offers it, that is a signal to upgrade your router or its firmware rather than to keep using WEP.
For networks with no password at all, set T:nopass and simply leave the password field empty. Some guest networks, particularly in hotels or offices, use this open configuration deliberately, sometimes paired with a login page after connecting.
Escaping special characters correctly
Certain characters have special meaning inside the WIFI: format, specifically semicolons, commas, backslashes, and colons, because they are also used as field separators. If your network name or password contains any of these, they need a backslash placed directly in front of them so the phone does not misread the string.
For example, a password of Coffee;Time! needs to be written as Coffee\;Time! inside the QR code text so the semicolon is not mistaken for the end of that field. This is the single most common cause of a Wi-Fi QR code failing to connect despite looking correct.
If your network name or password is entirely alphanumeric with no punctuation, you can skip this step entirely, which is one good reason to keep guest network passwords simple where security requirements allow it.
Hidden networks
If your network does not broadcast its name, add H:true to the string so connecting devices know to actively search for it rather than assuming it will appear in a normal scan of nearby networks. Leave this out, or set H:false, for a normal, visible network.
Hidden networks are a weak security measure on their own, since the network name is still broadcast in other parts of the Wi-Fi protocol and can be discovered with basic tools, so do not rely on hiding your SSID as a substitute for a strong password.
Building and testing the code
Put the full string together carefully, for example WIFI:S:HomeNetwork;T:WPA;P:MyPassword123;;, and paste it into a QR code generator as plain text. Double-check there are no stray spaces, since a trailing space inside a field value can cause connection failures that are maddening to diagnose.
Always test the finished code yourself before handing it to guests, scanning it with at least one iPhone and one Android device if you can, since the way each platform interprets the format has historically had small differences, particularly around hidden networks and special characters.
Printing and placing the code
Print the code at a reasonable size, at least 3cm square for something guests will hold close, like a card on a bedside table, and leave a clear white margin around it, since a tightly cropped code is a common and entirely avoidable cause of scan failures.
Placing the network name and password as plain text underneath the code as a backup is good practice, in case a guest's phone camera struggles or they simply prefer to type it in manually.
Security considerations for guest networks
Printing your main home or office Wi-Fi password on a QR code anyone can photograph is a real exposure if that network also has access to shared drives, printers, or smart home devices. Where possible, set up a separate guest network with its own password and no access to internal devices, and put that password on the QR code instead.
Change guest network passwords periodically, particularly for spaces like short-term rentals or offices with a lot of visitor turnover, and regenerate the QR code each time you do, since an old printed code with an outdated password will simply stop working.
A quick pre-flight checklist
Before printing anything, confirm the network name is spelled exactly as it appears on the router, the security type matches what the router is actually using, any punctuation in the password is correctly escaped, and you have personally scanned the finished code successfully on a real device.
Common questions
- Will a Wi-Fi QR code work on every phone?
- Most modern iPhones and Android phones running a reasonably recent operating system recognise the WIFI: format natively through their built-in camera app. Very old devices or those without a native QR-aware camera app may need a third-party scanner app instead, so it is worth testing on an older device if your guests are likely to have one.
- What happens if I get the security type wrong?
- The phone will typically attempt to connect using the specified method and fail silently or show a generic connection error, since it is trying the wrong authentication approach for your actual network. Double-check your router's settings to confirm whether it is running WPA/WPA2, and set T:WPA in almost all modern cases.
- Can I include a network with no password?
- Yes, set the security field to T:nopass and leave the password field empty, for example WIFI:S:CafeGuest;T:nopass;;. This tells the phone to join the network without prompting for a password, which is appropriate for genuinely open networks such as some public or guest hotspots.
- Is it safe to display my Wi-Fi QR code publicly?
- Only if you are comfortable with anyone who sees it joining your network. For a home network with access to shared devices, create a dedicated guest network with a separate password instead, and put only that guest password on any publicly visible QR code.
- My password has special characters and the code will not connect. Why?
- Characters like semicolons, commas, and backslashes have special meaning in the WIFI: format and need a backslash placed before them to be read correctly. This escaping step is the most common source of Wi-Fi QR codes that look correct but fail to connect, so check it carefully before printing.