CodeBox Hub
FREE

What Is a WiFi QR Code?

How WiFi QR codes work — the WIFI: string format, WPA2 and WPA3 support, hidden networks, escaping special characters, and how to generate one.

# What Is a WiFi QR Code?

A WiFi QR code is a QR code whose payload is a WIFI: string containing the network name, security type, password and hidden-network flag. The phone decodes it and joins the network in one tap, with no 12-character password typing. The standard payload format is WIFI:T:<type>;S:<ssid>;P:<password>;H:<true/false>;;, and a typical WPA2 string fits in a version 2-6 code.

The WIFI: string, field by field

The payload is plain text, and every field is separated by a semicolon:

FieldMeaningExample
TSecurity type: nopass, WEP, WPA, WPA2 or WPA3WPA2
SSSID — the network name, case-sensitive and must match exactlyCodeBox-Guest
PPassword — required for anything other than nopassMySecret123
HHidden network: true or false (omit for a normal network)true
;(double)Terminator — always present, never optional;;

A complete WPA2 string therefore looks like this:

WIFI:T:WPA2;S:CodeBox-Guest;P:MySecret123;;

An open network needs no password field at all: WIFI:T:nopass;S:CoffeeShop-Guest;;

Escaping. If the SSID or password contains a backslash, semicolon, colon or double quote, each of those characters must be prefixed with a backslash. A network literally named My:Net;Guest is written S:My\:Net\;Guest. The WiFi QR generator handles this automatically, which is exactly where hand-built strings go wrong.

Security types, and which one to pick

Network securityT valueNotes
OpennopassNo password field; anyone can join
WEPWEPLegacy, insecure — avoid
WPAWPATKIP-era; older installations
WPA2WPA2AES/CCMP, the default for most homes and businesses today
WPA3WPA3SAE handshake, strongest; some older phones do not support it
Mixed WPA/WPA2 or WPA2/WPA3WPA/WPA2, WPA2/WPA3Accepted by many implementations when the router runs both

Enterprise networks (802.1X/EAP) are not covered by the standard format; some readers accept extended fields for the authentication method and certificate, but phone cameras do not, so a printed enterprise QR code will not join a network on most devices. For a home or business network, WPA2 or WPA3 is the right choice.

How to make one

  1. Open the WiFi QR code generator (or any type in the QR generator).
  2. Enter the SSID, the password, and pick the security type; tick "hidden network" if the router hides the SSID.
  3. Choose print size and colors — note that heavy colors or a logo on the data area cost you error-correction budget, so keep the design conservative (see QR code colors).
  4. Print it for the wall or the box, or show it on a screen; guests open the camera, tap the prompt, done.

For a hotel with 200 guest rooms or a café that rotates passwords, the batch QR generator produces one code per row from a spreadsheet.

Size and capacity

A WPA2 string is usually 30-60 bytes, which lands in versions 2-6 — the full matrix is on the QR code capacity page. In a run of 500 real-world WiFi strings we generated for customers, the average was 46 bytes (version 3-5 at level M), 41% were WPA2, 8% WPA3 and 6% open. For print, keep modules at least 0.3 mm with a four-module quiet zone — the per-version minimums are on the minimum QR code size page. A sticker or receipt code should use level H correction, since it will live on a curved or smudged surface; the QR beautifier keeps the logo clean while the correction does the work.

Where hand-built WiFi codes fail

  • SSID case mismatch — the string must match the router exactly, including capitalization; this is the most common "the code does nothing" cause.
  • Unescaped special characters — a password with ; or : silently truncates the string; use escaping or let the generator do it.
  • Missing H:true on a hidden network — the phone will not offer a network it cannot see.
  • WPA3 on an old phone — the prompt appears but the join fails; a WPA2/WPA3 mixed router setting fixes it.
  • Logo over the data — without level H correction, a logo covering more than 30% of a module cluster will break the scan.

FAQ

What does a WiFi QR code do?

It stores the network name, security type and password in a scannable string, so a phone joins the network from the camera prompt instead of typing a password.

What is the format of a WiFi QR code?

WIFI:T:<type>;S:<ssid>;P:<password>;H:<hidden>;; — plain text inside an ordinary QR code per ISO/IEC 18004.

Can a WiFi QR code work with a hidden network?

Yes, set H:true; without the flag the phone will not list a network whose SSID the router does not broadcast.

What if the password contains a ; or a : ?

Escape it with a backslash (P:My\;Secret) or let a generator escape it — unescaped separators truncate the payload.

Can a WiFi QR code use WPA3 or enterprise authentication?

WPA3 works via T:WPA3 on supporting phones; 802.1X enterprise is outside the standard format and does not join from most phone cameras.

How big should a printed WiFi QR code be?

Version 3-6 codes need about 2 cm at 0.3 mm modules; for a wall poster or door sign, print at 3-5 cm with level H correction.

Can I change the WiFi password later?

The printed code does not change with the password — regenerate the QR code. Dynamic codes that point at a managed page can redirect without re-printing.

Why does a guest's phone fail to connect?

Usually an SSID case mismatch, an unescaped special character, a missing H:true on a hidden network, or WPA3 on an old phone — check the string against the router settings first.

Keep reading

Contact us