How to See a Wi-Fi Password on Windows 11 with CMD

//

Michael Collins

Open Command Prompt as an administrator, run netsh wlan show profiles to list the networks your PC has saved, then run netsh wlan show profile name="NetworkName" key=clear and read the password on the Key Content line. The command works for any Wi-Fi network the PC has joined and still remembers, whether or not you are connected to it right now.

These instructions are for Windows 11 Home and Pro. The same commands work on Windows 10, which reached end of support on October 14, 2025. Use them only on your own PC and for networks you own or have permission to use.

What You Need Before You Start

Windows keeps a small record, called a Wi-Fi profile, for every network you connect to. The profile holds the network name, the security type and the password. The netsh tool (short for network shell) is built into Windows and can read those profiles, so nothing needs to be downloaded or installed.

Three things decide whether the command can show you a password:

  • The PC must have joined the network before. If it never connected, or you chose Forget for that network later, there is no saved profile and nothing to show.
  • You need an administrator account. Microsoft’s netsh wlan show profiles reference says the key is shown in plain text only when the user has administrative privileges on the local computer. In a normal window, the profile still appears, but the password line is left out.
  • The network must use a shared password. Home networks (WPA2-Personal or WPA3-Personal) store one password for everyone. Work and school networks that sign you in with your own username, or with a certificate, do not have a shared password to reveal.

If your account is a standard account, someone with an administrator account on the PC has to sign in or approve the prompt. The guide to running Command Prompt as an administrator in Windows 11 covers the other ways to open an elevated window, including a shortcut that always opens as admin.

Show a Saved Wi-Fi Password with netsh

Windows 11 runs Command Prompt inside the Windows Terminal app, so you can start from either one. The steps below use the Start menu because it works the same on every edition.

  1. Select Start and type cmd. Command Prompt appears at the top of the results.
  2. Right-click Command Prompt and select Run as administrator. If you prefer the keyboard, press Windows + X and select Terminal (Admin) instead.
  3. Select Yes in the User Account Control box. A window opens with Administrator in its title bar, which tells you the elevated session worked.
  4. Type netsh wlan show profiles and press Enter. Under User profiles, each saved network appears on a line that starts with All User Profile, followed by its name.
  5. Find the network you need and note its name exactly as listed, including spaces, capital letters and any ending such as “-5G”. To avoid typos, select the name with the mouse and press Ctrl + C to copy it.
  6. Type netsh wlan show profile name="NetworkName" key=clear, replacing NetworkName with the name you copied (keep the quotation marks), and press Enter. A long block of details about that network appears.
  7. Scroll to the Security settings section and look at the Key Content line. The text after the colon is the Wi-Fi password.
Example netsh Key Content line with the password redacted (illustration)
Illustration: Example netsh Key Content line with the password redacted.
Four step diagram: open Command Prompt as administrator, run netsh wlan show profiles, run show profile with key=clear, read the Key Content line
Illustration: the netsh route from an administrator window to the Key Content line.

To check that you have the right password, type it on a phone or another device that is not yet connected to the network. If it connects, the password is current. If it is rejected, the router’s password was probably changed after this PC last connected; see the troubleshooting section below.

When you are done, close the window or type cls and press Enter to clear the screen, so the password is not left visible on a shared PC.

Reading the netsh Output

The full profile can look busy the first time you see it. Only a few lines matter for this task:

Line in the output What it tells you
SSID name The network name that other devices see when they search for Wi-Fi
Authentication The security type, such as WPA2-Personal or WPA3-Personal. An “Enterprise” entry means a work or school network with no shared password
Security key Whether the profile holds a password. Present means a key is stored; Absent means an open network or one that uses individual sign-ins
Key Content The password itself, shown only with key=clear in an administrator window
Connection mode Whether Windows joins the network automatically when it is in range

If you only want the password line, add a filter to the end of the command:

netsh wlan show profile name="NetworkName" key=clear | findstr /c:"Key Content"

The findstr tool prints only the matching line. To send that line to the clipboard instead of the screen, add | clip at the end, then paste it where you need it with Ctrl + V. Clear the clipboard afterward if other people use the PC.

The same netsh commands also run in a PowerShell tab of Windows Terminal, so you do not need to switch to Command Prompt if PowerShell is what opens. Command Prompt is used here because its quoting rules are the simplest for names with spaces. Command-line fans can also check and change which DNS servers a Wi-Fi adapter uses, as explained in changing DNS settings on Windows 11.

See the Password in Settings Instead

If typing commands is not your thing, Windows 11 can show the password in Settings. This route reads the same saved profile, so it shows the same password as netsh.

For the network you are connected to right now, open Settings (press Windows + I), select Network & internet, select Properties, and then select Show next to Wi-Fi network password.

For a network you used before but are not connected to now, follow this path and then select the network by name:

Menu path in Windows 11 Settings: Network and internet, Wi-Fi, Manage known networks, then Show next to Wi-Fi network password
Illustration: the Settings path to a saved network you are not connected to.

On the network’s page, select Show next to Wi-Fi network password. Microsoft lists both routes on its page about connecting to a Wi-Fi network in Windows.

Older steps you may see elsewhere use Control Panel: open Network and Sharing Center, select Change adapter settings, right-click your Wi-Fi adapter, select Status, then Wireless Properties, open the Security tab and check Show characters. That still works on Windows 11 and Windows 10, but it only covers the network you are connected to at that moment. For anything else, netsh or Manage known networks is the way.

Situation Best route
You are connected and want the password once Settings, Network & internet > Properties
A network you used before but are not on now Manage known networks, or netsh
Several networks, or the Settings button is missing netsh in an administrator window
Windows 10 PC netsh, or the Control Panel route for the current network
A backup of every saved network netsh export (next section)
Comparison of three ways to see a Wi-Fi password on Windows 11: Settings, netsh show profile and netsh export
Illustration: which route fits which job.

Save Every Wi-Fi Password at Once

When you are moving to a new PC or about to wipe this one, exporting all profiles is faster than running the show command for each network. The export writes one XML file per network.

  1. Create a folder for the files first, for example C:\WiFiBackup. netsh will not create the folder for you.
  2. In an administrator Command Prompt, type netsh wlan export profile folder="C:\WiFiBackup" key=clear and press Enter. Leaving out name= exports every saved network.
  3. Open the folder. Each file is named after the Wi-Fi adapter and the network, such as “Wi-Fi-HomeNetwork.xml”.
  4. Right-click a file and open it with Notepad. The password sits on the keyMaterial line, and the protected line just above it reads false, which means the key in this file is plain text.
Example exported Wi-Fi XML with keyMaterial redacted (illustration)
Illustration: Example exported Wi-Fi XML with keyMaterial redacted.

Microsoft’s netsh wlan command reference explains that the XML file contains the key in plain text only when you are a local administrator and use key=clear; otherwise the key is encrypted. Treat these files like a written list of passwords. Copy them to a USB drive or a private folder you control, never to a shared drive or an email, and delete them from the PC (and empty the Recycle Bin) once you are finished.

To bring a saved network back on another Windows PC, run netsh wlan add profile filename="C:\WiFiBackup\Wi-Fi-HomeNetwork.xml" in an administrator window. The network then appears in that PC’s saved list, ready to connect when it is in range.

When the Password Does Not Appear

There is no Key Content line. The window is not running as administrator, or the network has no shared password. Check the title bar for Administrator. If it is there and Security key says Absent, the network is open or uses individual sign-ins.

netsh says the profile is not found on the system. The name does not match a saved profile. Run netsh wlan show profiles again and copy the name instead of typing it. Wrap names that contain spaces in quotation marks.

The network is not in the list at all. The PC never joined it, someone selected Forget for it, or a network reset removed it. A network reset in Windows 11 deletes every saved Wi-Fi profile, so look up any passwords you need before you run one. If the network is gone, the password has to come from the router or from another device that still remembers it.

netsh says there is no wireless interface on the system. Windows cannot see a Wi-Fi adapter. Turn Wi-Fi on in Quick Settings, check that airplane mode is off, and look under Network adapters in Device Manager for a disabled or missing adapter.

netsh asks for location permission. Some netsh commands that read live Wi-Fi details, such as netsh wlan show interfaces and netsh wlan show networks, can stop with a message that network shell commands need location permission. Since the 2024 Windows 11 feature update, Microsoft puts apps’ access to nearby Wi-Fi details behind the location setting. Open Settings > Privacy & security > Location and turn on Location services, then run the command again.

The password shown does not work on a new device. The saved key is the one this PC used the last time it connected. If the router’s password was changed since then, the stored copy is out of date. Sign in to the router’s settings to see the current password, or ask whoever manages the network.

Key Content shows a long string of letters and numbers. Some networks use a 64 character hexadecimal key instead of a normal passphrase. Type it exactly as shown; it is the real key.

Other Useful netsh and Command Prompt Checks

A few related commands answer the questions that usually come up next:

  • netsh wlan show interfaces shows the network you are connected to right now, its signal strength and its band. It is the quickest way to confirm which saved profile is in use.
  • netsh wlan delete profile name="NetworkName" removes a saved network, the same as Forget in Settings. Use it when an old password keeps failing, then connect again and type the new one.
  • ipconfig shows the address your PC received on the network. If a device or router page asks for it, finding your IP address on Windows 11 explains which address to use and how to read the output.

Wi-Fi passwords are only one kind of password Windows keeps. Website logins are stored in your browser, and passwords for shared folders sit in Credential Manager; the guide to finding saved passwords on Windows 11 shows where each one lives and which ones Windows will reveal.

Wi-Fi Password Questions

Can I see the password for a network my PC never joined?

No. netsh and Settings read only the profiles stored on this PC. They cannot reveal the password of a nearby network you have not connected to, and trying to get into a network you are not allowed to use can break the law and the owner’s rules. Ask the owner, or check the label on your own router.

Does this work on Windows 10?

Yes. The netsh commands, the export and the Control Panel route are the same on Windows 10. The Settings route with Manage known networks and a Show button is laid out for Windows 11. Windows 10 no longer gets security updates after October 14, 2025, so upgrading is worth planning if the PC supports Windows 11.

Is it safe to run these commands?

Yes. show profile with key=clear only displays what Windows already stores; it does not change the password, the network or the router. The real risk is someone seeing the password on your screen or finding an exported XML file, so clear the window and delete exports when you are done.

Can I share the password with my iPhone without typing it?

Windows does not send Wi-Fi passwords to an iPhone directly. Read the password with netsh or Settings and type it on the phone. Once one iPhone is connected, it can pass the password to other Apple devices nearby, as explained in the guide to sharing Wi-Fi from an iPhone.

Why does my work laptop show no password?

Most company networks use individual sign-ins or certificates (the Authentication line says something like WPA2-Enterprise), so there is no shared password stored on the laptop. Your IT department may also block administrator access. Contact them to connect another device.