Explained

How Wi-Fi QR codes work, and how to 3D print one that scans

Published · How we check our guides

Short answer

A Wi-Fi QR code holds one line of text, WIFI:T:WPA;S:name;P:password;;, which phone cameras read and offer to join. To print one that scans, keep each square at 1.6 mm or more with a 0.4 mm nozzle, dark on a light base, with a plain border.

What’s inside a Wi-Fi QR code

A Wi-Fi QR code holds one short line of text in a fixed format that phone cameras recognise. For a network called “Home” with the password “sunflower42”:

WIFI:T:WPA;S:Home;P:sunflower42;;

FieldMeansValues
T:Security typeWPA for almost every home network (WPA2 and most WPA3 routers too), WEP for very old ones, nopass for open networks
S:Network name (SSID)Exactly as it appears, capitals included
P:PasswordLeft out for open networks
H:Hidden networktrue only if the network doesn’t show up in lists

Five characters have a special meaning in this format: backslash, semicolon, comma, colon and double quote. When they appear in a network name or password they must be written with a backslash in front (\;), or phones read the wrong password. Good generators do this for you; it’s a common reason a home-made code “almost” works.

Which phones can scan it

The built-in camera app on iPhones and on most Android phones recognises Wi-Fi codes and offers to join the network: point the camera at it and tap the notification. No app is needed, and the guest never has to type the password.

Make one you can print

  1. Open QR code to STL and choose Wi-Fi.
  2. Type the network name and password, and pick the security type (WPA unless you know otherwise).
  3. Scan the preview on screen with your phone. If it joins, the printed one will too.
  4. Choose a sign, coaster or tag, add a caption such as “Scan for Wi-Fi”, and download the STL or two-colour 3MF.

The code and the model are made in your browser; the password isn’t sent anywhere.

How big does it need to be?

A QR code is a grid of squares, and longer text needs a bigger grid. For a 0.4 mm nozzle, keep each square at about 1.6 mm or more. Around the code you also need a plain border: the QR standard asks for four squares, and phones cope with a little less (the generator keeps at least two and a half). With its default error correction, Medium (QR level M):

CodeGridCode at 1.6 mm per square
Short password (“Home” / “sunflower42”)29 × 2946 mm, plus the border
Typical (“Smith-Family-5G” / a 28-character passphrase)33 × 3353 mm, plus the border
Long name and a 31-character random password37 × 3759 mm, plus the border

Raising the error correction to High (QR level Q) or Max (level H) makes the code survive scratches and dirt, but adds squares: the typical code above grows to 41 × 41 at High. Print it bigger to keep the squares at 1.6 mm.

Two colours with one nozzle

Print the base in a light colour and change to a dark filament where the code starts. In PrusaSlicer, click the + on the layer slider at that height; in Bambu Studio and OrcaSlicer, right-click the layer slider and choose Add Pause (or Change filament once a second filament is in the project); in Cura, use the Filament Change post-processing script. With a multi-colour printer, open the 3MF and give the code and the base different filaments.

It won’t scan: what to check

  • The phone sees it but can’t join. The details are wrong, not the print: a changed password, the wrong security type, or a name typed slightly differently. Scan the on-screen preview to confirm.
  • The phone doesn’t react at all. Usually contrast or size: dark code on a light base, matte filament (silk and glossy reflect into the camera), squares of 1.6 mm or more, and the plain border intact.
  • Light code on a dark base. Some phone cameras and scanner apps won’t read inverted codes. Swap the colours.
  • Stringing or blobs between squares. Fine strands of plastic bridge the gaps. Dry the filament, tune retraction, or print the code a little bigger.

Is it safe to put the password on a sign?

Anyone who can see or photograph the code can read the password from it, exactly as if it were written down. Put it where only guests see it, or better, use your router’s guest network: guests get internet without access to your own devices, and changing that password doesn’t disturb anything else. If you change the password, print a new code.