Skip to content

How to make a Wi-Fi QR code: the format, special characters and a printable card

Make a QR code that joins your Wi-Fi: the WIFI: text format, escaping special characters, hidden networks, WPA3, guest-network safety and a printable card.

By Shortlen Editorial Updated 7 min read

The short answerA Wi-Fi QR code holds one line of text such as WIFI:T:WPA;S:Cafe Guest;P:sunny-day-42;; which phone cameras read and offer to join. Enter the network name, password and security type in a Wi-Fi QR generator, escape any ; , : quote or backslash characters, add H:true for a hidden network, then print the code on a card with the network name and password beside it.

Key takeaways

  • The code is plain text in a fixed format: T for security, S for network name, P for password, H for hidden, ending with two semicolons.
  • The characters backslash, semicolon, comma, double quote and colon must be escaped with a backslash, or the code joins the wrong network or none.
  • Use T:WPA for WPA2 and mixed WPA2/WPA3 networks; Android's own code also understands T:SAE for WPA3, but test every phone type you expect.
  • The password sits in the code as readable text, so put a guest network on the card, not your main one.
  • A static code is the right choice for Wi-Fi: it works before the phone is online and nothing can switch it off.

Reading out a long Wi-Fi password to every guest gets old fast. A Wi-Fi QR code lets people join with one scan: the phone reads the network name and password and offers to connect. This guide explains exactly what goes inside the code, the special characters that break hand-made codes, what to do about hidden and WPA3 networks, and how to print a card that works the first time.

What is inside a Wi-Fi QR code?

A Wi-Fi QR code holds a single line of text in a format first documented by the open-source ZXing barcode project, which phone cameras now read. For a network called Cafe Guest with the password sunny-day-42, it is:

WIFI:T:WPA;S:Cafe Guest;P:sunny-day-42;;

ZXing describes the format as modeled on the MECARD contact format. Each field is a letter, a colon and a value, followed by a semicolon, and the whole line ends with two semicolons. The order of the fields does not matter.

FieldMeaningValues
TAuthentication typeWPA (personal WPA networks), WEP, WPA2-EAP, or nopass (or left out) for an open network
SNetwork name (SSID)Required, exactly as broadcast
PPasswordLeft out when T is nopass
HHidden networktrue when the router does not broadcast its name
E, A, I, PH2Enterprise settingsOnly for WPA2-EAP: EAP method, anonymous identity, identity, phase 2 method

When a phone camera reads this text, it shows a prompt to join the network. Apple’s iOS 11 developer talk described exactly that: tapping the Wi-Fi banner prompts the user to connect.

Wi-Fi QR codes are always static: the network details are inside the pattern itself. That is a good thing here, because a guest who scans the code is not online yet and cannot reach a redirect service.

How do you make a Wi-Fi QR code, step by step?

  1. Check the network name. Copy it exactly as it appears in your phone’s Wi-Fi list. Capitals, spaces and apostrophes all count.
  2. Pick the security type. For almost every modern router choose WPA (it covers WPA2 and mixed WPA2/WPA3 networks); WEP only if the router says WEP; none for an open network.
  3. Enter the password, and tick hidden network if the name is not broadcast.
  4. Generate the code. Our free Wi-Fi QR code generator builds the text, escapes special characters for you, and runs entirely in your browser, so the password is never sent anywhere.
  5. Download PNG for screens, SVG for print, or the printable card.
  6. Test with a phone that has never joined the network, ideally one iPhone and one Android. A phone that already knows the network proves nothing.

Which special characters need escaping?

This is where hand-made codes fail. Some characters have a meaning in the format, so a value that contains them must mark them with a backslash. ZXing lists five: backslash \, semicolon ;, comma ,, double quote " and colon :.

Your valueWritten inside the code
Password pa;ssP:pa\;ss;
Password a:b,cP:a\:b\,c;
Network Joe's "Cafe"S:Joe's \"Cafe\";
Password ending in a backslash key\P:key\\;

Without escaping, a semicolon in the password ends the field early, and the phone tries to join with half a password.

ZXing notes one more edge case: if the network name or password is made only of characters that could be read as a hexadecimal number, such as ABCD or 1234, wrap it in double quotes (P:"1234";) so it is read as text. A generator that follows the format handles both rules automatically.

Does a Wi-Fi QR code work with WPA3?

Mostly, yes, with care. The format predates WPA3. Since then, the Wi-Fi Alliance has registered a wifi URI scheme with IANA that refers to section 7 of its WPA3 specification; the registration says the format is designed to stay compatible with the widely used existing format while adding WPA3 features.

In practice:

  • Mixed WPA2/WPA3 networks: use T:WPA. That is what most generators, including ours, write for WPA, WPA2 and WPA3 personal networks.
  • WPA3-only networks: Android’s own Settings code, in the Android Open Source Project, lists SAE (the WPA3 personal method) as a security value next to WPA, WEP and nopass. We could not find current Apple documentation on how iPhones treat T:SAE or a WPA3-only network, so test on an iPhone before printing. If it fails, the simplest fix is to run the guest network in WPA2/WPA3 mixed mode.
  • Enterprise networks that ask for a username (WPA2-Enterprise) have their own fields in the format, but phone support varies and our generator does not cover them.

Can a Wi-Fi QR code join a hidden network?

The format supports hidden networks with H:true. Phone support has been the weak point: in Apple’s 2017 developer talk introducing QR scanning on iOS 11, Apple said hidden SSIDs were not supported. That talk is old, and behavior may have changed, but it is a good reason to test. For a guest network, the easy answer is to broadcast its name: the card already shows the name and password to anyone who reads it, so hiding the name gains you nothing there.

A shield with a padlock
The password in a Wi-Fi code is readable by anyone who scans it, so give it its own guest network.

Is it safe to put your Wi-Fi password in a QR code?

The password is stored as plain text. Anyone who scans the code with a reader app, or photographs it, can read it. Treat the printed card like the password itself:

  • Use a guest network. Most routers can run a separate guest network that cannot reach your computers, printers, cameras or tills. Put that one on the card.
  • Rotate the password every few months, and print a new card when you do; the old one stops working the moment the password changes.
  • Keep cards indoors, where only guests and customers see them.
  • Never print your main network. If someone photographs the card, they should only ever get guest access.

How do you print a Wi-Fi card that scans first time?

A good card has four elements:

  1. A heading: “Free Wi-Fi: scan to join” tells people what the code does. NN/g’s guidance is to explain what a code is for, because a bare code gives no reason to scan.
  2. The code itself, dark on a light background.
  3. The network name and password in text, for laptops and older phones that cannot scan.
  4. A blank margin around the code. DENSO WAVE’s specification requires a four-module margin on every side.

Size it for where people will hold their phones. NN/g recommends at least 2 x 2 cm and about 1 cm of width for each 10 cm of distance. A table card read from 30 to 40 cm needs a code of 3 to 4 cm; a sign at reception read from 1 m needs about 10 cm. The QR code size guide has the full chart.

A printed card with a scannable QR code labelled scan to explore
A clear heading, the code, and the network details in text for anyone who cannot scan.

What if the Wi-Fi code does not work?

SymptomLikely causeFix
Camera does not reactLow contrast, small code, no marginReprint larger, dark on light, with a margin
Prompt appears, joining failsWrong password or unescaped characterCheck the password; regenerate with a generator that escapes
Joins on Android, fails on iPhoneHidden network or WPA3-only settingBroadcast the name; try mixed WPA2/WPA3
Worked last month, not nowPassword changedPrint a new code
Joins the wrong networkNetwork name typed differentlyCopy the name exactly from the phone’s list

For problems that are not Wi-Fi specific, the QR code not working guide has a full fault-finding flow, and how to scan a QR code covers each phone’s scanner.

Static or dynamic for Wi-Fi?

For most marketing codes we recommend dynamic codes you can edit and track. Wi-Fi is the exception. A static code goes straight to the phone’s join prompt and works with no internet connection. Make BN Shortener Wi-Fi codes static (untick Dynamic): only a static code makes the phone offer to join the network. Use the static code on the card; save dynamic codes for menus, posters and pages you may change. The static vs dynamic QR codes guide explains the difference.

Wi-Fi QR code checklist

  • Network name copied exactly from a phone’s Wi-Fi list.
  • Security type WPA for WPA2 and mixed networks.
  • Special characters escaped (the generator does it).
  • Guest network, not the main one.
  • Code at least 3 cm on a table card, dark on light, with a margin.
  • Network name and password printed in text beside the code.
  • Tested on an iPhone and an Android phone that never joined before.
  • A reminder to reprint whenever the password changes.

Start free

Make the Wi-Fi card now with our free Wi-Fi QR code generator, and if you also want codes you can edit and track for menus and posters, start free at b1.lc. The free plan includes 5 dynamic QR codes; Pro is $15 a month ($144 a year) and Business $49 a month ($468 a year). For contact details on a card, try the vCard QR code generator.

Sources

  1. Barcode Contents: Wi-Fi network config, ZXing project wiki (GitHub), undated. Checked 2026-10-23.
  2. Uniform Resource Identifier scheme registration: wifi (provisional), IANA, 2020-12-15. Checked 2026-10-23.
  3. WifiQrCode.java, Android Settings app (AOSP mirror), Android Open Source Project, undated. Checked 2026-10-23.
  4. QR Code Recognition on iOS 11, Apple Developer (video), 2017. Checked 2026-10-23.
  5. Points for setting QR Code symbol size (module size and margin), DENSO WAVE (QRcode.com), undated. Checked 2026-10-23.
  6. 13 QR-Code Usability Guidelines, Nielsen Norman Group, 2024-02-09. Checked 2026-10-23.

Questions people also ask

How do I make a QR code for my Wi-Fi?

Use a Wi-Fi QR code generator: enter the network name exactly as it appears in your phone's Wi-Fi list, the password and the security type, tick hidden if the name is not broadcast, and download the code. Test it with a phone that has never joined the network before you print.

What is the text format of a Wi-Fi QR code?

WIFI: followed by fields separated by semicolons and two semicolons at the end, for example WIFI:T:WPA;S:Cafe Guest;P:sunny-day-42;; T is the security type, S the network name, P the password and H:true marks a hidden network. The fields can be in any order.

My password has a semicolon in it. Will the code still work?

Yes, if the semicolon is escaped with a backslash, so pa;ss becomes pa\;ss inside the code. The same applies to backslash, comma, double quote and colon. A good generator escapes them for you; hand-typed codes often get this wrong.

Does a Wi-Fi QR code work with WPA3?

Usually, with T:WPA, which most readers treat as WPA personal in general. Android's Settings code also defines SAE, the WPA3 method, as a security value. Behavior on WPA3-only networks varies by phone, so test with both an iPhone and an Android phone before printing.

Can a Wi-Fi QR code connect to a hidden network?

The format supports it with H:true. Support on phones has varied: Apple said in its iOS 11 developer talk that hidden SSIDs were not supported. If your network is hidden, test on current iPhones and Androids, or broadcast the guest network's name.

Is it safe to put my Wi-Fi password in a QR code?

The password is stored as readable text, so anyone who scans or photographs the code can read it. Use a separate guest network that cannot reach your own devices, change its password now and then, and print a new code when you do.

Try it on your next link

The Free plan includes a custom domain, 5 dynamic QR codes, a bio page and click analytics. No credit card.