How to Format WiFi QR Code Strings (WPA2/WPA3 Guide)

WiFi QR Code Format Explained: Structure, Fields & Examples

After years of building and debugging digital tools at ToolsQue, I’ve seen countless WiFi QR codes fail for one simple reason: a single misplaced semicolon. Most people see a random pattern of black and white squares. I see a structured command string beginning with WIFI: a precise instruction your smartphone parses character by character. In this guide, I’ll break down the standardized syntax that powers scan-to-connect WiFi sharing. This is based on real implementation, testing, and troubleshooting across WiFi QR generators and decoders. If you want to generate, validate, or debug WiFi QR codes properly, this is the technical foundation you need.

What Is the WiFi QR Code Format?

A WiFi QR code stores credentials in a structured plain-text string. The general format looks like this:

WIFI:T:WPA;S:NetworkName;P:Password;H:false;;

WiFi QR Code Format

WIFI:T:WPA;S:NetworkName;P:Password;H:false;;

Every character matters. Remove one delimiter and the connection can silently fail. If you already have a QR image and want to extract the data inside it, you can use a WiFi QR decoder to instantly reveal the SSID, password, and encryption type.

Field Breakdown (What Each Part Means)

WIFI: Required prefix. Without this, devices treat the QR as normal text instead of a WiFi command.
T: Security type (WPA, WPA2, WPA3, WEP, nopass).
S: SSID — the network name exactly as broadcast.
P: Password for the network.
H: Hidden network flag (true or false).
;; End-of-string marker required for proper parsing.

The SSID and password are case sensitive. Small mismatches cause real failures.

Visual Anatomy of the WiFi String

Example string:
WIFI:T:WPA;S:OfficeWiFi;P:StrongPass456;H:false;;

Think of it structurally:

WIFI → Protocol identifier
T:WPA → Security method
S:OfficeWiFi → Label (Network Name)
P:StrongPass456 → Key (Access Password)
H:false → Visibility instruction
;; → End marker

The SSID is the label your device searches for. The password is the key used for authentication. If the label is wrong, the device looks for a network that doesn’t exist. If the key is wrong, authentication fails. If you are generating codes manually, always validate the final string before creating the QR image using a WiFi QR format validator or decoder tool.

Security Type (T Field)

Common values: WPA, WPA2, WPA3, WEP, nopass.
Example: T:WPA2;

The security type must match the router configuration exactly. If it doesn’t, your device may attempt connection and instantly reject it.

SSID (S Field)

This must match the router’s broadcast name exactly.
Example: S:HomeFiber_5G;

SSID comparison is often case sensitive. Even a minor mismatch can prevent auto-connection.

Password (P Field)

Example: P:MySecurePass123;
If the network is open (nopass), the password field can be omitted.

Hidden Network Flag (H Field)

Example: H:true; or H:false;

Many users assume H:true is only for privacy. In reality, it instructs the scanning device to send a probing request directly for that SSID instead of waiting for a passive broadcast. Without this flag, your phone can sit next to a hidden router and never detect it. This is a common cause of “QR scans but doesn’t connect” issues. If you’re troubleshooting that exact issue, see our guide on how to fix WiFi QR codes that won’t connect.

Special Characters (Where Most Generators Break)

If your SSID or password contains characters like ; : , \ " ', they must be escaped using a backslash. Example password: My;Pass:2026
Correct format: P:My\;Pass\:2026;

Failure to escape these characters causes parsing errors. Many low-quality generators skip this step, which is why some codes scan but fail. If you’re unsure whether your string is formatted correctly, paste it into our decode WiFi QR code tool to verify the structure before sharing it.

Exact Syntax for Hidden WiFi QR Code

The correct format for a hidden WiFi network is:

WIFI:T:WPA2;S:HiddenSSID;P:Password123;H:true;;

The H:true flag forces the device to actively probe for the network instead of waiting for broadcast discovery.

WiFi QR Code Format for iPhone

iPhone uses the same standard WIFI: format:

WIFI:T:WPA2;S:MyNetwork;P:MyPassword;;

WPA3 requires iOS 13 or newer. Hidden networks must include H:true for proper detection.

WiFi QR Code Format for Android

Android follows the same WIFI: syntax:

WIFI:T:WPA3;S:AndroidNet;P:SecurePass;;

If scanned using a third-party QR app instead of the system camera, Android may display the raw string instead of auto-connecting.

WiFi QR Code: WPA2 vs WPA3 Difference

The structure is identical. Only the security type changes.

WPA2:

WIFI:T:WPA2;S:MyNetwork;P:Password;;

WPA3:

WIFI:T:WPA3;S:MyNetwork;P:Password;;

The device must support WPA3 or connection will fail.

Can a WiFi QR Code Store Multiple Networks?

No. The standard WIFI: format supports only one SSID per QR code. To share multiple networks, separate QR codes are required.

Complete Working Examples

WPA2 Network
WIFI:T:WPA2;S:OfficeWiFi;P:StrongPass456;H:false;;

Open Network
WIFI:T:nopass;S:CafeGuest;;

Hidden WPA Network
WIFI:T:WPA;S:PrivateNet;P:HiddenPass789;H:true;;

Why This Matters for Security

The WiFi QR format is convenient but not encrypted. The data inside the QR code is plain text. Anyone using a basic QR reader can extract the network name, password, and security type.

Security Warning: Anyone who takes a photo of your WiFi QR code can read your password using any standard text scanner. Never post your WiFi QR code publicly, on social media, or in storefront windows where it can be zoomed in on. Treat your WiFi QR exactly like a written password.

Common Formatting Mistakes

Missing WIFI: prefix
Incorrect security type
Missing ending ;;
Unescaped special characters
Extra spaces between fields

Bad example: WIFI: T:WPA; S:Home; P:12345;;
Correct example: WIFI:T:WPA;S:Home;P:12345;;

Even a stray space can cause inconsistent behavior across scanners.

Can You Manually Decode a WiFi QR Code?

Yes. If you scan using a generic QR reader instead of the built-in WiFi scanner, it will display the raw string. From there you can manually extract the SSID, password, and encryption type. This is exactly how WiFi QR decoding tools operate internally. If you prefer automation, use our WiFi QR decoder to instantly extract WiFi password details without manual parsing.

Can WiFi QR Codes Be Dynamic or Expire?

The standard WIFI: QR format is static. Once generated, the QR code permanently contains the SSID and password as plain text. There is no built-in support for expiration, time limits, user caps, or automatic disabling.

So-called “dynamic WiFi QR codes” are typically URL-based QR codes. Instead of embedding credentials directly, the QR redirects to a web page where access details are displayed or controlled. The QR image stays the same, but the landing page content can be updated or disabled at any time.

If you need temporary access, the safer approach is to create a guest network on your router, generate a QR code for that SSID, and rotate the password when access should expire.

FAQ

What is the exact WiFi QR code format?

The standard structure is:

WIFI:T:WPA;S:NetworkName;P:Password;H:false;;

Each field must be separated by semicolons, and the string must end with double semicolons (;;). Missing delimiters can cause connection failure.

What is the WiFi QR code format for WPA3?

The structure remains the same. Only the security type changes:

WIFI:T:WPA3;S:MyNetwork;P:MyPassword;;

The device must support WPA3. Older phones may fail silently if WPA3 is unsupported.

What is the correct format for a hidden WiFi network?

You must include the hidden flag:

WIFI:T:WPA2;S:HiddenSSID;P:Password123;H:true;;

Without H:true, devices may not actively probe for the network and auto-connection can fail.

Why does my WiFi QR code scan but not connect?

Common causes include:
Incorrect security type (WPA vs WPA2 mismatch)
Unescaped special characters in the password
Hidden network flag missing
Extra spaces inside the string
Router using WPA2-Enterprise (unsupported by basic format)
Verify the raw string before generating the QR image.

How do I escape special characters in a WiFi QR code?

Characters such as ;, :, and \ must be escaped using a backslash.
Example:
Password:
My;Pass:2026
Correct format:

P:My\;Pass\:2026;

Failure to escape characters breaks parsing.

Is the WiFi QR code encrypted?

No. The QR code stores credentials as plain text. Anyone using a standard QR scanner can extract the SSID and password.
Never share your WiFi QR code publicly.

Does WiFi QR format work the same on iPhone and Android?

Yes. Both platforms use the same WIFI: syntax. However:
WPA3 requires modern OS versions.
Hidden networks require H:true.
Third-party QR apps may display raw text instead of auto-connecting.

Can a WiFi QR code store multiple networks?

No. The standard format supports only one SSID per QR code. Multiple networks require separate QR codes.

Does WiFi QR code support WPA2-Enterprise?

No. The basic WIFI: format does not support enterprise fields such as EAP identity, username, or certificates. It is designed for personal WPA/WPA2/WPA3 networks.

Does case sensitivity matter in WiFi QR format?

Yes. SSID and password fields are case sensitive. Even minor differences will prevent successful authentication.

Why are double semicolons (;; ) required at the end?

The double semicolon signals the end of the WiFi data block. Some scanners may still parse without it, but the format standard requires it for compatibility.

Can I manually create a WiFi QR code from text?

Yes. If you correctly format the string:

WIFI:T:WPA2;S:HomeNet;P:SecurePass123;;

You can generate a QR image using any QR generator that supports raw text input.

Why This FAQ Is Strong

It:
Targets technical long-tail intent
Answers troubleshooting variations
Uses structured formatting
Includes copy-paste syntax blocks
Covers security, compatibility, and limitations
This is how you move from “blog explanation” to “authority reference.”


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *