Wi-Fi QR syntax

The WIFI: string format that lets a phone join a network from a scan.

A Wi-Fi QR code encodes a single structured string, originating from ZXing's conventions and now supported natively by iOS and Android:

WIFI:T:WPA;S:NetworkName;P:ThePassword;H:false;;
  • T — security type: WPA (covers WPA/WPA2/WPA3), WEP, or nopass
  • S — the SSID, exactly as it appears when joining
  • P — the password, omitted for nopass
  • H — true if the network is hidden

The escaping trap. The characters \, ;, ,, : and " must be backslash-escaped inside a field. A password containing a semicolon terminates the field early in a generator that does not escape, and the phone attempts to join with a truncated password — failing with no useful error.

Security note. The password is in the pattern in plain text. Anyone who photographs the code has it. Use a guest network.

In practice

A guest house sets its Wi-Fi password to Coast;2026!. A generator that does not escape the semicolon produces WIFI:T:WPA;S:Guest;P:Coast;2026!;; — and the phone reads the password as Coast, then fails to connect with no useful error.

Correctly escaped it reads P:Coast\;2026! and joins first time. Because the failure is silent and looks like a router problem, this one costs people a surprising amount of time.

Questions

Why does my Wi-Fi code fail on one phone but not another?

Usually the security type. A network running WPA3-only can be refused by devices expecting WPA2 when the code specifies the wrong type. WPA covers the family and is the safer value.

Can I make a Wi-Fi code dynamic?

Not directly — joining a network is not a URL. The workaround is a dynamic code pointing at a page on your site that displays the current credentials, which lets you rotate the password without reprinting.

Related terms

All terms Make a code free