How to Share Your Wi-Fi Password with a QR Code (found with netsh on Windows)

Guests asking for the Wi-Fi password, and then typing it wrong three times, is a small daily annoyance. A Wi-Fi QR code fixes it: point a phone camera at it and the phone joins the network, with no typing. This guide shows how to find the password on Windows, how the QR code works and how to print it.

Step 1: Find the Wi-Fi password on Windows

Using Command Prompt (every Windows version)

Open Command Prompt (press Windows + R, type cmd, press Enter) and list the networks this PC has saved:

netsh wlan show profiles

Then show the password for your network. Replace MyNetwork with the exact profile name:

netsh wlan show profile name="MyNetwork" key=clear

The password is on the line Key Content under Security settings. The line Authentication tells you the security type (WPA2-Personal, WPA3-Personal and so on), which you'll need in step 2.

Using Settings (Windows 11)

On recent Windows 11 versions, go to Settings → Network & internet → Wi-Fi. Open your network's properties and click View next to View Wi-Fi security key.

Step 2: Understand what goes inside the QR code

A Wi-Fi QR code is just a short piece of text in a standard format that Android and iPhone cameras both understand:

WIFI:T:WPA;S:MyNetwork;P:MyPassword;;
  • T: is the security type: WPA (use this for WPA, WPA2 and WPA3), WEP, or nopass for an open network.
  • S: is the network name (SSID), exactly as it appears, including capital letters.
  • P: is the password. Leave it out for nopass.
  • For a hidden network, add H:true; before the closing ;;.

Special characters: if the name or password contains ;, ,, :, " or \, put a backslash in front of each one. For example, the password pa;ss becomes pa\;ss. Forgetting this is the most common reason a Wi-Fi QR code "doesn't work".

Step 3: Make the QR code

Any QR generator that accepts plain text can encode the string above. The simplest route is a generator with a Wi-Fi option, which builds and escapes the string for you. Duqit's free QR code generator has one:

  1. Choose Wi-Fi network.
  2. Enter the name and password, and pick the security type.
  3. Download a print-sized PNG.

There's no account and no watermark. Because the network details are stored inside the code itself, it never expires. (Disclosure: I work on Duqit.)

Step 4: Print it the right size

  • Size rule of thumb: the QR code should be about 1/10 of the scanning distance. A code scanned from 30 cm (a table) needs to be about 3 cm wide; one on a wall scanned from 1 m should be 10 cm or more.
  • Contrast: dark code on a light background. Inverted (light-on-dark) codes fail on some phones.
  • Quiet zone: keep a white margin around the code. Don't let a frame or text touch it.
  • Test with one Android phone and one iPhone before you laminate it.

Scanning it

  • iPhone: open the Camera app, point it at the code and tap the "Join network" banner.
  • Android: open the Camera app or Google Lens and tap the network suggestion. Many Android phones can also show a Wi-Fi QR code: go to Wi-Fi → the network → Share. That's handy when you're away from your PC.

Security note

Anyone who photographs the code has your password. For a shop, café or rental, put the code on a separate guest network (most routers have this option), so visitors never reach the devices on your main network.

Comments