WiFi QR Code Generator
Type your network name and password, and get a code guests join with one camera tap — no more spelling out passwords. Encoding runs entirely in your browser: the password is never transmitted, logged, or stored by us.
Print checklist
- Keep the white margin around the code — it is the quiet zone scanners need, not empty space to crop.
- Size for the scan distance: at least 2 × 2 cm for arm's-length scanning, and roughly one tenth of the farthest scan distance for posters.
- Scan a test print with a real phone before making copies.
How a WiFi QR code works
A QR code has two independent layers. The payload is the text encoded inside; the
symbol is the black-and-white matrix that carries it. For a WiFi code the payload
is a single line in a de-facto convention that phones recognize: WIFI:T:<security>;S:<name>;P:<password>;;. It is not an RFC. It is documented on the ZXing "Barcode Contents" wiki, and this engine's
builder was verified against that source on 2026-07-20. The symbol is produced to ISO/IEC
18004 by a vendored copy of the reference encoder (Project Nayuki's qrcodegen), kept
byte-comparable with upstream. Most "my code doesn't work" problems are payload problems,
which is why this page spends most of its words on the payload.
Field by field: T: carries the security token, one of WEP,
WPA or nopass. S: carries the network name (SSID).
P: carries the password and is omitted entirely for an open network.
H:true is appended only when the network is hidden. Each field ends with a semicolon,
and the whole string ends with a second one — the ;; that closes every payload on this
page. Because ; and : are the structure of the format, a password that
contains them has to be escaped; the characters \ ; , : "
are backslash-escaped automatically so a password like caffe;latte cannot corrupt the
code. The rule is demonstrated below, and when the camera decodes the payload, a phone that understands
the convention offers to join the network with exactly those credentials. Every network name and
password on this page is invented for the example; none of them belongs to a real network.
Read next: The WiFi QR payload format — the convention field by field, the escaping and quoting rules demonstrated on more inputs, the security types, and what the format cannot verify. More background is in all guides.
Worked example
Network CafeGuest, WPA2, password espresso-42 produces exactly this
payload:
WIFI:T:WPA;S:CafeGuest;P:espresso-42;;
Rendered by the same engine as the generator above — version 3, 29×29 modules, error correction M. Scan it with your phone to see the join prompt.
Reading the symbol facts
Under each example card the encoder reports three facts, and for a WiFi code they answer a practical question: what a longer passphrase, a punctuated one or a quoted one costs in symbol density. The version is the size class the encoder settled on for the payload; the module count is the symbol's width in modules, the small squares, before the quiet zone is added; and the error-correction level is the recovery level actually encoded, one of L, M, Q or H. The generator asks for M unless you choose otherwise, but the reported level can come back higher than the request, never lower: the reference encoder raises it whenever the raise costs nothing in version, so a row in the table that reads higher than M is the encoder doing exactly that. A logo takes the choice away and forces H.
The table collects the symbol facts for every example on this page. Note how the payload
length drives the version, and the version drives the module count: the
CafeGuest payload of 38 characters is version 3 at 29×29 modules, while the longest inputs the builder accepts
— a 32-character name and a 63-character
passphrase, one more character in either refused, 113 characters of payload —
need version 7 at 45×45.
| Example | Payload length | Version | Modules | Error correction |
|---|---|---|---|---|
| CafeGuest, WPA2 | 38 characters | 3 | 29×29 | M |
| Bakery Loft, punctuated password | 49 characters | 4 | 33×33 | M |
| DECAF, all-hex name and password | 35 characters | 3 | 29×29 | M |
| StudioLoft, WPA3 and hidden | 49 characters | 4 | 33×33 | M |
| ReadingRoom, open network | 29 characters | 3 | 29×29 | Q |
| Harbourside Reading Room Guests!, longest inputs | 113 characters | 7 | 45×45 | M |
The download panel's print-size readout is derived from the same facts, and it is a size, not
a scanning guarantee. Each PNG preset is a square — 512, 1024, 2048 pixels on a side
— and the readout is that width over 300 dots per inch, restated in millimetres. What the
readout does not say is how wide a single module comes out, and for a WiFi code that depends on
the passphrase: the pixel width is shared between the symbol's modules and the
4-module quiet zone on either side, so the 38-character
CafeGuest payload and the 113-character Harbourside payload
print very different module widths from the same preset. The table works that division out for
both. The widths are nominal: the PNG renderer places every module edge on a whole-pixel
boundary, so the modules in the file are whole-pixel widths that differ from this average by
less than a pixel. The quiet zone and print size guide does the division for every preset in more detail.
| PNG preset | Print size | Nominal module width, version 3 | Nominal module width, version 7 |
|---|---|---|---|
| 512 px | 1.71 in × 1.71 in (43.3 mm × 43.3 mm) at 300 DPI | 1.17 mm | 0.82 mm |
| 1024 px | 3.41 in × 3.41 in (86.7 mm × 86.7 mm) at 300 DPI | 2.34 mm | 1.64 mm |
| 2048 px | 6.83 in × 6.83 in (173.4 mm × 173.4 mm) at 300 DPI | 4.69 mm | 3.27 mm |
Error correction helps a damaged code scan, but print size and contrast still matter, and the engine cannot know what your printer and your guests' cameras will make of a given module width. Treat a freshly generated code as untested until a real device has scanned it.
Punctuation in passwords: the escaping rule
The convention's escaping rule, as the ZXing wiki states it and the builder's header quotes
it, is that the special characters \, ;, ,, "
and : are escaped with a backslash. The engine's escapeWifi function does
exactly that and nothing more. The backslash is handled first, so a character that is already escaped
is never processed twice — that ordering is locked by a test. Everything else passes through untouched:
spaces, accented letters and emoji are not escaped, because the convention gives no reason to.
| Typed value | As it appears in the payload |
|---|---|
one;two | one\;two |
k,v | k\,v |
12:30 | 12\:30 |
say "hi" | say \"hi\" |
a\b | a\\b |
Bakery Loft | Bakery Loft |
café ☕ | café ☕ |
The delimiters are what give the string its structure. A bare ; inside a password would
read as the end of the P: field, and a bare : as the mark between a field's
letter and its value, which is the corruption the escaping exists to prevent. The example below
uses a fictional password chosen because it contains every escaped character at once.
Network Bakery Loft, WPA2, password tea;cake:4,"ok" produces:
WIFI:T:WPA;S:Bakery Loft;P:tea\;cake\:4\,\"ok\";;
The space in the network name is untouched; every semicolon, colon, comma and quote in the password gained a backslash. Version 4, 33×33 modules, error correction M: the escaping adds characters, and the characters are what the symbol has to carry.
All-hex names and passwords are quoted
The same source adds a second rule that catches people out: an SSID or password consisting entirely of hex digits — the characters 0 to 9 and A to F, in either case — must be enclosed in double quotes so readers interpret it as literal ASCII rather than hex-encoded bytes. The builder checks hexness against the raw value you typed (a value containing any character that needs escaping is by definition not all-hex), and the enclosing quotes are literal: they are added after escaping and are never escaped themselves. That, too, is locked by tests.
Network DECAF, WPA2, password CAFE2024 — both values
happen to be made only of hex digits — produces:
WIFI:T:WPA;S:"DECAF";P:"CAFE2024";;
Change the password to CAFE2024! and the quotes around it disappear
while the name keeps its own: WIFI:T:WPA;S:"DECAF";P:CAFE2024!;;. Version 3,
29×29 modules, error correction M.
The quotes are the convention's marker, not characters of your password. They tell a reader
that the value is the text itself, and the engine adds them without being asked because it
cannot otherwise know whether CAFE2024 was meant as
8 characters or as 4 bytes.
Security types and the hidden flag
The builder accepts five security values — WEP, WPA,
WPA2, WPA3 and nopass — which the form offers as four options:
"WPA / WPA2 (most common)", "WPA3", "WEP (legacy)" and "None — open network", with WPA and WPA2
sharing one entry. The convention defines only three tokens for T:, so all five
values map onto them. WEP becomes T:WEP, the open network becomes
T:nopass, and WPA, WPA2 and WPA3 all become T:WPA: the fictional
CafeGuest network built with each of the three in turn produces the identical payload
WIFI:T:WPA;S:CafeGuest;P:espresso-42;;, and this page fails to build if that ever stops being true.
That last mapping is deliberate and test-locked: WPA2 and WPA3-Personal both map to the
standard WPA token because the joining device negotiates the strongest protocol with
the router itself, and emitting a nonstandard token breaks parsers, so the engine never produces
one. Choosing WPA3 in the form is therefore correct for a WPA3 router, and the payload will still
read T:WPA.
If your network's name is not broadcast, tick "Hidden network". The builder then appends
H:true; before the closing semicolon and changes nothing else. Without the flag the
payload is still well-formed, but it carries no indication that the network must be looked up by
name: scanning appears to work, yet the phone may never find the network. The example below exercises
both rules at once.
Network StudioLoft, WPA3 selected, password north-window-7, hidden network ticked, produces:
WIFI:T:WPA;S:StudioLoft;P:north-window-7;H:true;;
WPA3 has become T:WPA and the hidden flag sits between the password and the closing
;;. Version 4, 33×33 modules,
error correction M.
An open network drops the P: field altogether rather than leaving it empty, and the
builder refuses to combine the open-network choice with a password: typing one produces the message
"An open network (nopass) has no password." instead of a code. A fictional reading-room network with no
password encodes as:
Network ReadingRoom, "None — open network", produces:
WIFI:T:nopass;S:ReadingRoom;;
Only the token and the name remain. Version 3, 29×29 modules, error correction Q.
For completeness, the legacy token: a fictional network OldPrinter with the WEP
key wepkey01 encodes as WIFI:T:WEP;S:OldPrinter;P:wepkey01;;. The builder's
passphrase-length check applies to the WPA family and not to WEP, and it holds at both ends: a
passphrase of short is refused with "A WPA passphrase is 8–63 characters." and one character
beyond the Harbourside passphrase above with "A WPA passphrase is 8–63 characters." The name-length check
applies to every type: one character beyond the limit and the builder answers "An SSID is at most 32 characters." The messages above are the engine's own, printed here at build time, so the limits in the
prose cannot drift from the limits in the form.
What the generator cannot verify
The engine validates format, not truth. It can confirm that a network name is within the length limit, that a WPA passphrase has an acceptable length, that an open network carries no password and that every delimiter is escaped. It cannot know whether the password is correct, whether the name is spelled the way the router spells it, or whether the security type you picked is the one the router uses. A wrong password encodes exactly as well as the right one — the builder checks its length and its escaping, nothing more — and the only test that settles the question is a real device scanning the code and joining the network.
Every code this site produces is static: the data lives in the image itself, with no redirect through our servers. That, together with encoding that runs in your browser, is why the password never leaves your device; it is also why the code never expires and cannot be held hostage, and why it cannot be edited after printing and why scans cannot be counted. A changed password needs a new code. The same fact has a consequence worth stating plainly: the payload carries the password as readable text, as every secured-network example on this page shows, so anyone who decodes the symbol — or photographs the printout and decodes it later — has the password for as long as it remains valid. Whatever network you choose to publish, the printout deserves the same care as the password itself, and if you save a code to an account rather than to this device, the generator warns you before a WiFi password is uploaded to your private library.
Common misreadings
- Cropping the quiet zone. When a code is set into a card or a sign, the 4 modules of white around the symbol look like margin to trim. They are not margin: the standard requires them, the renderer draws them into every download, and nothing in the style panel removes them. Setting the code flush against a border in a layout program removes them just as surely as cropping the file does; every example above keeps them.
- Styling the colours. The style panel runs every colour pair through the WCAG relative-luminance formula and warns under 4.5:1; it warns separately for light-on-dark codes, which many scanners reject. Three pairs show the shape of it. Black on white (#000000 on #ffffff) assesses at 21.00:1 and draws no warning. A mid-grey on white (#8a8a8a on #ffffff) assesses at 3.45:1 and draws "Low contrast (3.45:1). Scanners may fail below 4.5:1 — darken the foreground or lighten the background." White modules on near-black (#ffffff on #1a1a1a) assess at 17.40:1 — far above the line — and still draw "Light-on-dark (inverted) codes are not reliably read by all scanners. Prefer dark modules on a light background." A high ratio is a necessary condition, not the whole test; the contrast guide runs the formula on more pairs.
- Putting a logo over a WiFi code. A logo in the centre reads as branding; to the
decoder it is a block of destroyed modules that error correction has to rebuild. The engine therefore
forces error correction H the moment a logo is placed and refuses a logo larger than
16% of the symbol area — a limit set by decoding worst-case logos in the
round-trip suite, not read off the theoretical recovery ceiling. The logo is drawn over the
image; the
WIFI:payload underneath is unchanged. Error correction and logos shows the geometry. - Blaming the symbol for a wrong password. A code that scans, shows a join prompt and then fails to join is, as far as the engine can tell, indistinguishable from one that works: both are well-formed payloads. The engine cannot distinguish a wrong password from a right one, so check the credentials on the router before suspecting the code — and if the credentials are right, a code that still will not join is exactly the kind of report the contact page asks for.
Printing: using the readout
The download panel's print-size readout tells you how large each PNG preset is at 300 DPI, and the module-width table above turns that into the nominal width of a single square for the shortest and longest payloads on this page. Two things follow. A longer payload — a longer passphrase, a longer name, a password full of escaped punctuation — means more and smaller modules at the same print size, so the inputs you choose set the density of what you print. And the quiet zone is included in that width: the symbol itself is 29 of the 37 modules across for the short example, with 4 modules of white on each side that must stay white.
The readout is arithmetic and the contrast check is a formula; neither is a scan. Print one copy, scan it with a real device, join the network, and only then print the rest.
WiFi QR code FAQ
Is it safe to type my WiFi password here?
The password never leaves your device: the code is drawn by JavaScript in your browser, and this page makes no network request with your input. If you save the code, "Save to this device" keeps it in this browser only; saving to an account uploads it to your private cloud library — and the generator explicitly warns you before that happens.
Does the code stop working if I change the password?
Yes — the password is inside the code, so a changed password needs a new code. That is the nature of a static code: nothing to expire, but also nothing to edit remotely.
Which phones support scanning WiFi codes?
A phone that understands the WIFI: convention offers to join the network with the credentials in the payload when its camera decodes the code. Whether a particular phone does is not something this generator can determine, so treat a freshly generated code as untested until a real device has scanned it and joined. Very old devices may need a QR scanner app that understands the WIFI: format.
Can I make a code for an open network with no password?
Yes — choose "None — open network". The code then carries only the network name, and phones join without a password prompt.
WEP shows as an option — should I use it?
Only if the network really is WEP, which is obsolete and insecure. The option exists for compatibility with legacy hardware, not as a recommendation — upgrade the router if you can.
The code scans and shows a join prompt, but the phone does not join — is the code wrong?
Not necessarily. The engine validates format, not truth: it checks that the network name and password fit the structure of the convention, not that they match your router. A mistyped password, a misspelled network name or the wrong security type all encode perfectly and produce a code that scans cleanly and then fails to join. Check the credentials against the router first; if they are right and the code still fails, that is exactly the kind of report the contact page is for.
Can I crop the white border to fit the code into a smaller space?
No. The 4 modules of white on each side are the quiet zone the QR standard requires, and the renderer writes them into every PNG and SVG with no option to turn them off, because cropping them is the most common self-inflicted scan failure. A code that has to fit a smaller space is scaled down as a whole, border included; the print-size table above shows what that costs in module width.
Can I put a logo in the middle of a WiFi code?
Yes. The engine handles the two consequences itself: a logo destroys modules that error correction has to rebuild, so every code with a logo is encoded at error correction H, and the logo is refused above 16% of the symbol area. The cap comes from decode tests — the round-trip suite checks that a worst-case logo at that size still decodes — rather than from a theoretical ceiling. The logo lives in the image only; the WIFI: payload is unchanged.
Also useful: put a contact-card code on the front desk, a menu link code on tables, or a Google review code by the till. How the encoding is built and verified is on the methodology page.