These sample WiFi QR codes test the one thing most generators get wrong: the exact WIFI: payload syntax. Eight test codes cover every security mode (WPA, WEP, open, hidden), plus the edge cases — spaces, escaped semicolons, 63-character passwords, Unicode SSIDs — that separate a careful reader from a careless one. Scanning all eight on one iPhone and one Android takes about ten minutes and catches the failures that only show up when a guest is standing at your door.
WiFi codes are the highest-stakes QR payload in everyday use: a URL code that breaks wastes a click, but a WiFi code that breaks strands a real person without internet. This is the WiFi slice of our sample QR codes for testing library, and it pairs with the URL test codes if you want to test the reader side first.
How WiFi Codes Encode Credentials
Every WiFi QR code is a plain-text string in a fixed format that both iPhone and Android cameras understand:
WIFI:T:WPA;S:NetworkName;P:thepassword;H:false;;
Four fields, each ending with a semicolon: T is the security type, S is the SSID (network name), P is the password, and H says whether the network is hidden. The trailing double semicolon closes the format. Two honest facts about this syntax: it started as a convention from the open-source ZXing project rather than a formal standard, and both platform cameras adopted it anyway — which is why it works everywhere in practice. (QR codes themselves come from Denso Wave, who invented the symbology in 1994 and maintain its official history.)
The T field is coarser than the WiFi industry would like: generators typically write WPA for WPA, WPA2, and WPA3 networks alike, and phones sort out the actual handshake when joining. That quirk is invisible in normal use but matters when you test — the code does not and cannot promise WPA3 specifically.
The WiFi Test Codes
Encode each payload exactly as written. Cases 1–3 cover the security modes; cases 4–8 are the edge cases that actually find bugs. When you scan each one, compare what the phone shows against the "expected result" column — a wrong SSID in the join prompt is a failure even if the scan itself "worked".
| # | Payload to encode | Expected result | What it proves |
|---|---|---|---|
| 1 | WIFI:T:WPA;S:HomeNet;P:correct-horse-battery;; | Join prompt shows "HomeNet"; wrong password is the only reason joining fails | Baseline WPA parsing |
| 2 | WIFI:T:WEP;S:OldNet;P:12345;; | Modern phones typically refuse or warn — WEP is deprecated security | Backward-compatibility behavior |
| 3 | WIFI:T:nopass;S:CoffeeShopWiFi;; | Join offer with no password field | Open-network handling |
| 4 | WIFI:T:WPA;S:StealthNet;P:hiddenpass123;H:true;; | Phone accepts the hidden flag; some versions finish the join in Settings | Hidden-network flow |
| 5 | WIFI:T:WPA;S:Guest Network;P:welcome123;; | Join prompt shows the space inside the name | Spaces are legal and unescaped |
| 6 | WIFI:T:WPA;S:Net\;1;P:pass1234;; | Phone looks for an SSID literally named Net;1 | Escaped semicolons parse correctly |
| 7 | WIFI:T:WPA;S:LongPass;P:Qa!2wsxQa!2wsxQa!2wsxQa!2wsxQa!2wsxQa!2wsxQa!2wsxQa!2wsxQa!2wsx;; | All 63 characters accepted (the WPA maximum) | Maximum-length password handling |
| 8 | WIFI:T:WPA;S:Café_WiFi;P:pass1234;; | Join prompt shows the accent; behavior varies by reader | Unicode SSID support |
Case 1 doubles as a negative test: deliberately scan it against a network that doesn't exist and note how the phone reports the failure. That "network not found" behavior is what you'll reuse to diagnose case 6 failures — a misparsed escape makes the phone hunt for a network name that was never meant to exist.
Keep a note of the exact failure message for each rejected case, too. "Network not found" means the join prompt was generated but the SSID never materialized — a name-parsing problem. "Wrong password" after the network was found means the name parsed but the key didn't — a different payload problem with a different fix. Two failure messages, two debugging directions, and both visible from your desk instead of at your front door.
To encode your own variants with real credentials, the WiFi QR code creation guide walks through generator choices — including the ones that silently mangle escaping.
Escaping and SSID Edge Cases
The WIFI: format uses ; , : \ and " as structure characters, so an SSID or password containing any of them must escape it with a backslash. Everything else — spaces, accents, emoji — goes in literally. Five characters, one rule:
| Character in SSID/password | Encode it as | Example |
|---|---|---|
\ (backslash) | \\ | SSID Sales\IT → S:Sales\\IT; |
; (semicolon) | \; | SSID Net;1 → S:Net\;1; |
, (comma) | \, | SSID Office,2F → S:Office\,2F; |
: (colon) | \: | SSID lab:guest → S:lab\:guest; |
" (quote) | \" | Password a"b → P:a\"b; |
Most broken WiFi QR codes trace back to this table. A generator that forgets to escape a semicolon produces a code that scans perfectly and joins a network that doesn't exist — the decode succeeded, the payload was wrong. That failure mode is invisible on screen and only appears when someone actually tries to connect, which is exactly why case 6 belongs in every test pass. The mirror-image bug: over-escaping, where a generator "helpfully" backslashes characters that don't need it (spaces are the usual victim), producing an SSID with literal backslashes in the name.
One desk-level sanity check catches both bugs before any device gets involved: decode your generated code as text instead of scanning it — paste the image into a browser scanner that shows the raw string, then read the S and P fields with your own eyes. If the string shows S:Sales\\IT; where you meant Sales\IT, you have found the bug in five seconds, no phone required.
iPhone vs Android Behavior
Both native cameras speak the same payload format, so differences show up in the handling around the scan. The honest version of the comparison:
| Behavior | iPhone (native camera) | Android (native camera) |
|---|---|---|
| Join offer | Shows the network name; one tap joins without typing the password | Same — name plus a one-tap join |
| Wrong password in payload | Join is attempted, then reports failure — the code never validates the key | Same: failure surfaces at connect time, not at scan time |
| Hidden networks (case 4) | May finish the flow in Settings; varies by iOS version | May also complete in Settings; varies by version |
| WEP (case 2) | Typically refuses — WEP is cryptographically broken | Typically refuses as well |
| Case sensitivity | SSID case must match exactly; mismatch just reads "not found" | Same strict matching, same silent failure |
| Password display | Native camera does not display the decoded password | Native camera joins directly; third-party scanner apps often show it as text |
The practical takeaway: generate one set of codes, scan on both platforms, and expect agreement on cases 1, 3, 5, and 6 with possible disagreement on 4 and 8. Disagreement is not a bug in your test — it's the result. Same payload, different platform, different behavior is precisely the fact your rollout plan needs.
Frequently Asked Questions
What's the minimum recommended size for reliable QR code scanning?
Around 2 cm square for a phone held at arm's length, and the 10:1 rule generalizes it: minimum width is the scan distance divided by ten. WiFi payloads are mid-length strings, so they produce moderate-density codes — no sizing penalty like a 200-character URL, but don't shrink below 2 cm for door-sign use.
Can QR codes function without active internet connectivity?
Yes — and WiFi codes are the proof. The phone decodes the payload offline, joins the network offline, and only then does internet arrive. It's the QR chicken-and-egg problem solved: the code that gets you online cannot itself require being online.
How can I differentiate between static and dynamic QR codes?
A static code bakes its final payload in forever; a dynamic code encodes a redirect the provider can repoint later. The distinction barely applies to WiFi codes — credentials are inherently static, since the phone needs the real network name and key. Dynamic is a URL-code concept; the URL test codes page shows how to probe the difference there.
What are the most common causes of QR code scanning failures?
For WiFi codes specifically: unescaped structure characters (case 6), over-escaped spaces, a wrong T value, and SSID case mismatches. Physical causes — glare, distance, contrast — come after that. When a WiFi code scans but won't connect, decode the payload as text and compare it against the escaping table above; the bug is usually visible in the string.
Do different QR scanning tools produce varying results with the same code?
Yes, and hidden networks and Unicode SSIDs are where they disagree most. The native camera apps agree on the common cases; third-party apps differ on display and edge handling. The same variance shows up with vCard test codes, which is why every serious test pass runs on at least two devices.
Wrap-Up
Eight payloads, two platforms, ten minutes: cases 1–3 prove the security modes parse, case 4 proves your hidden-network flow, cases 5–8 prove the escaping rules survived generation. The escape table is the memory that pays off forever — five characters need backslashes, everything else goes in literally. Run the set before your next guest-network rollout, and the WiFi code that fails will be the one you generated wrong, caught at your desk instead of at your front door.