WiFi QR Code Format Explained (WIFI:T:WPA;S;P)

Updated: 2026-11-03 · 6 min read

Every WiFi QR code you have ever scanned hides one short line of plain text. Once you can read that line, you can build codes by hand, debug the ones that fail and understand exactly what you are sharing.

Quick answer: The standard WiFi QR code format is WIFI:T:<security>;S:<network name>;P:<password>;H:<true|false>;;. T is WPA, WEP or nopass, S is the SSID, P is the password, H marks a hidden network, and the string ends with two semicolons. Special characters (\ ; , : ") inside the name or password must be escaped with a backslash.
In this guide
  1. Where this format comes from
  2. The fields one by one
  3. Escaping special characters
  4. What about WPA3?
  5. Enterprise networks
  6. Ready-to-copy examples
  7. Reading an existing code
  8. Common format mistakes
  9. Building codes the easy way
  10. Size and error correction
  11. A quick self-test
  12. FAQ

Where this format comes from

The WiFi QR format is not an official ISO standard. It was popularised by the open-source ZXing barcode project, which Android and many scanner apps used, and phone makers adopted it because it was simple. Today the Android camera, Google Lens, the iPhone Camera app (iOS 11+), Samsung's camera and most third-party scanners understand it. That shared support is why one printed code works on almost any modern phone.

The QR code itself is just a container. You could store this text in a normal text QR code; the phone notices that the text starts with WIFI: and offers to join the network instead of showing the raw text.

The fields one by one

A full string looks like this:

WIFI:T:WPA;S:CoffeeCorner;P:latte2026!;H:false;;

Each field is a letter, a colon, a value and a semicolon. The order of fields usually does not matter, but the order above is the most common and the safest.

Escaping special characters

Because semicolons, colons and commas act as separators, they cannot appear raw inside a name or password. Put a backslash before these characters:

Example: a network called Cafe;Guest with password pa:ss,word becomes:

WIFI:T:WPA;S:Cafe\;Guest;P:pa\:ss\,word;;

Spaces, #, @, ! and emoji do not need escaping, although emoji in SSIDs can confuse some older devices. A good generator escapes characters for you. Hand-written codes are where escaping mistakes creep in, and an unescaped semicolon is a classic reason a code joins nothing, as described in WiFi QR Code Not Working? 9 Fixes That Work.

One more quirk: if an SSID or password looks like a hexadecimal number (only 0–9 and a–f), the original ZXing spec suggested wrapping it in double quotes so it is not read as hex. Most current scanners treat values as text anyway, but if a code with a hex-looking password fails, try quoting it, for example P:"deadbeef";.

What about WPA3?

WPA3-Personal uses a different handshake called SAE, but most WiFi QR codes still say T:WPA. Phones that support WPA3 look at what the router offers and negotiate the strongest mode automatically. The Wi-Fi Alliance's WPA3 specification describes extra optional fields, such as R: for transition-disable and K: for a public key, and some tools write T:SAE. Support for these extras is uneven, so for a code guests will scan, T:WPA is the most compatible choice. We compare the options in WPA2 vs WPA3: What to Pick in Your QR Code.

Enterprise networks

Office networks that use usernames (WPA2/WPA3-Enterprise, 802.1X) are a different story. Android supports extra fields such as E: for the EAP method, PH2: for phase 2, I: for identity and A: for anonymous identity, for example:

WIFI:T:WPA2-EAP;S:CorpNet;E:PEAP;PH2:MSCHAPV2;I:alex;P:secret;;

iPhones generally do not join enterprise networks from a QR code; companies use configuration profiles or device management instead. For most offices, a separate guest network with a shared password is easier. See WiFi QR Codes for Offices and Events.

Ready-to-copy examples

Replace the values with your own and paste the string into any text-to-QR generator to test the format:

Reading an existing code

Curious what a code on a café table actually contains? A plain QR reader that shows text before acting will reveal the full string, password included. That is a good habit for any unknown code, and it is the reason you should never post your own WiFi QR code publicly. Our article on fake QR codes and quishing explains why checking before tapping matters.

Common format mistakes

  1. Lowercase prefix. wifi: may be ignored by some scanners. Use WIFI:.
  2. Wrong T value. Writing WPA2 or WPA3 instead of WPA. Many scanners accept these, some do not.
  3. Missing escapes. A ; in the password cuts the password short.
  4. Trailing spaces. S:MyHome ; makes the network name "MyHome " with a space.
  5. Wrong case. The SSID and password are case-sensitive.
  6. Smart quotes. Copying from a word processor can turn " into curly quotes that break the string.
  7. Forgetting H:true for a hidden network, so the phone never finds it.

Building codes the easy way

Hand-crafting the string is a useful skill, but for daily use a generator avoids typos. On Android, Wifi QR Connect lets you create a WiFi QR code by entering the SSID, picking the security type and typing the password, and it can scan existing WiFi QR codes too. It also includes hotspot sharing by QR, a download/upload speed test and current WiFi connection info, with scan history kept locally on your device. If you prefer to build codes by hand, test each one by scanning it on a phone that has forgotten the network first.

For a full walkthrough of making a printable code, see How to Make a WiFi QR Code for Guests.

Size and error correction

The text is short, so WiFi QR codes are small and simple. Choose medium (M) or quartile (Q) error correction if your generator lets you; this helps scanning when the code is slightly scratched or printed on textured paper. Longer passwords create denser codes, so print a little larger if your password is 30+ characters.

A quick self-test

Want to check that you really understand the format? Try decoding this string in your head before reading the answer:

WIFI:S:Guest\;Room;T:WPA;P:blue\,sky;H:true;;

The fields are in an unusual order, which is allowed. The network name is Guest;Room (the backslash protects the semicolon), the security is WPA, the password is blue,sky, and the network is hidden. If you got that right, you can debug almost any WiFi QR code you will meet in a home, café or office.

FAQ

Is the WiFi QR format the same on Android and iPhone?

Yes. Both read the same WIFI:T:...;S:...;P:...;; string, which is why a single printed code works for everyone. Enterprise fields are the main exception, as iPhones usually ignore them.

Should I write WPA2 or WPA in the T field?

Write WPA. It covers WPA, WPA2 and usually WPA3 personal networks, and it is the value every scanner understands.

Do I need H:false?

No. Leaving out the H field means the network is treated as visible. Include H:true only for hidden networks.

Why does my password get cut off?

Usually an unescaped semicolon, comma or colon. Add a backslash before each one, or let a generator escape them.

Is the password encrypted inside the QR code?

No. It is stored as plain text, so anyone who scans or photographs the code can read it. Treat the printed code like the password itself.

Related guides