Wi-Fi QR Codes: The Format Explained
Published: 22 October 2026 · by QuikTools Hub
Point your phone camera at the little square on a cafe table and you are connected - no typing a password full of look-alike characters, no asking the staff to spell it. A Wi-Fi QR code feels like a trick, but there is no magic in it at all: the code simply contains one line of text written to a convention that phone makers agreed to recognise. Once you can read that line, you can check any Wi-Fi code before you print it, spot why a hand-made one fails to scan, and understand exactly what you are sharing. You can make one in about a minute with our QR Code Generator - it has a dedicated Wi-Fi mode - but first, the format itself.
The payload, field by field
Here is a complete, real example. Everything a phone needs to join the network "HomeNet" is in this single string:
WIFI:T:WPA;S:HomeNet;P:correcthorsebatterystaple;H:false;;
- WIFI: - the opening label. It is how the scanner knows this QR code is Wi-Fi credentials and not a web link or plain text.
- T:WPA - the authentication type. WPA covers WPA and WPA2 home networks. Older routers may use WEP; open networks with no password use the value nopass and leave the password field out entirely.
- S:HomeNet - the SSID, which is simply your network name, exactly as it appears in a list of available networks, including capitals and spaces.
- P:correcthorsebatterystaple - the password, stored as plain readable text. Hold that thought; the security section below explains why it matters.
- H:false - whether the network is hidden (it does not broadcast its name). Almost every home and cafe network leaves this false.
- The semicolons separate the fields, and the doubled semicolon at the end closes the string. Miss one out and strict scanners may refuse the code or quietly join the wrong thing.
That is the entire format. It was popularised by the ZXing barcode project, Apple added support to the iPhone camera in iOS 11, and Android followed - which is why virtually any phone from the last several years joins a network from a scan with no extra app. The same generator also has a vCard mode for contact cards, which works the same way: a small, standard block of text that phones know how to interpret.
Escaping: the fiddly part
Semicolons separate the fields, so what happens if your password itself contains a semicolon - or a comma, a quote, a colon, or a backslash? Those five characters have jobs inside the format, so each one must be escaped: written with a backslash in front of it. A password typed as p@ss;word has to appear in the payload as p@ss\;word. Get this wrong and the phone reads the password as ending early, then tries to join with the wrong credentials and fails without any useful error. This is the single most common reason hand-written Wi-Fi codes do not work, and it is why generating the code with a tool that escapes automatically - the QR Code Generator does - beats typing the string yourself.
An honest note on security
A Wi-Fi QR code is not a way of protecting your password. It is the opposite: it is your password, printed in a machine-readable font. Anyone who scans the code - or photographs it and scans the photo later - can read the actual password out of it in seconds. Treat a printed Wi-Fi code exactly like writing the password on a noticeboard, because that is what it is. For a guest network, a cafe, a holiday let or a workshop, that is usually fine and is the entire point. For your main home network, it is still reasonably safe while the code stays inside your house - but never post a photo of it publicly, and if one does escape, change the password and print a fresh code. For anything genuinely sensitive, the right answer is a separate guest network with its own password, which most modern routers offer.
Printing a code that actually scans
- Size: 2 cm (about 0.8 inches) square is a workable minimum for a simple code on a table tent; go bigger - 3 to 4 cm - for a poster people scan from a step away, or when a long password makes the pattern dense.
- Density: the more text in the payload, the more tiny squares the code needs. Long network names and long passwords both add density, so give dense codes more physical size.
- Contrast and quiet zone: dark squares on a light background, with a clear margin of blank space around the code. Do not crop tight to the pattern, invert the colours, or print it over a photo.
- Test before you commit: scan the printed copy with two different phones, at the distance and in the lighting where guests will actually use it. A code that only scans on your phone, up close, in bright light, will fail in the wild.
How to make one here
- Open the QR Code Generator and choose the Wi-Fi tab (the other tabs make link/text codes and contact cards).
- Type your network name exactly as it appears on your phone, and your password.
- Pick the encryption your router uses - WPA/WPA2 for almost every modern network, WEP only for very old ones, or None for an open network - and tick Hidden network only if yours does not broadcast its name.
- Click Generate QR code, then download the PNG (256, 512 or 1024 pixels - pick 1024 for print) and test-scan it before putting it out.
Everything happens in your browser: the network name and password you type are encoded on your own device and are never uploaded, which is rather the point when the thing you are encoding is a password. If a guest ever needs the details read back from an existing code, our QR Code Scanner decodes codes from an image or a camera, also locally. Browse the rest of the QR & Barcode Tools for barcodes and related utilities.
More guides on the QuikTools Hub blog.