Where are Wi-Fi passwords stored on a computer: all the ways to extract them

Forgot your home Wi-Fi password, and the sticker on your router has worn off? Or need to connect a new device but can't be bothered to fiddle with the router settings? Passwords for all connected networks are stored directly on your computer. — and they can be extracted without special software. In this article, we'll look at where exactly Windows, macOS, and Linux store Wi-Fi security keys, how to find them using system tools, and what to do if standard methods don't work.

Spoiler: Most methods do not require administrator rights, but Some actions (such as editing the registry) may disrupt system stability.. Therefore, before experimenting, create a restore point - especially if you are working with Windows Registry or Terminal in Linux. And if you're looking for a password for someone else's network (for example, in a cafe or office), remember: Unauthorized access to networks is punishable by law — more about this in the section on legal risks.

By the way, did you know that modern versions of Windows encrypt Wi-Fi passwords linked to the user account? This means that simply copying the key file to another PC won't work—you'll need to export it using specialized tools. But first things first.

═══

1. Where Windows stores Wi-Fi passwords: system files and the registry

In operating systems Windows 10 And Windows 11 Wireless network passwords are stored in two places: secure storage of credentials (through Managing credentials) And system registry. At the same time the keys are not physically open - they are encrypted using Windows Data Protection API (DPAPI), and to read them you need the current user's rights.

Main storage methods:

  • 📁 Configuration file: C:\ProgramData\Microsoft\Wlansvc\Profiles\Interfaces\{GUID}\ — here in format .xml There are profiles of all saved networks, but the passwords in them are encrypted.
  • 🔑 Windows Registry: branch HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Wlansvc\Interfaces contains network identifiers, but not the keys themselves.
  • 🔒 Credential storage: available through Control Panel → User Accounts → Credential Manager (but Wi-Fi passwords are not displayed there directly).

To see the password in a readable form, you will have to use either command line, or PowerShellMore on that in the next section. For now, remember: deleting files from a folder Profiles\Interfaces will result in the loss of saved networks — the computer will “forget” all Wi-Fi networks it has ever connected to.

⚠️ Attention: If you are using a corporate account Microsoft Entra ID (previously Azure AD), Wi-Fi passwords may be stored in the cloud and synced across devices. In this case, local extraction methods won't work.

2. How to find out the Wi-Fi password via the command line (CMD)

The most reliable way is to use the built-in utility netsh (Network Shell). It works on all versions of Windows starting from XP, and doesn't require any additional software. Here are the step-by-step instructions:

1. Open command prompt as administrator (click Win + XTerminal (administrator)).

2. Enter the command to view all saved networks:

netsh wlan show profiles

3. Find the name of the desired network in the list (for example, MyWiFi_5G) and run:

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

4. In the section Security parameters find the line Key content - this is your password.

If the command returned an error The operation failed., check:

  • 🔹 Is the network name spelled correctly (case is important!).
  • 🔹 Is the command prompt running with administrator rights?
  • 🔹 Are you currently connected to this network (Sometimes Windows does not show the key for inactive profiles).

The command prompt is run as administrator.

The network name is entered without typos (case sensitive)

The computer has previously connected to this network.

Disabled VPNs or proxies that may be blocking netsh-->

An alternative method is through PowerShell (useful if netsh doesn't work):

(netsh wlan show profiles) | Select-String "\:(.+)$" | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name="$name" key=clear)} | Select-String "Key contents\W+\:(.+)$" | %{$pass=$_.Matches.Groups[1].Value.Trim(); [PSCustomObject]@{PROFILE=$name;PASSWORD=$pass}} | Format-Table -AutoSize

This command will output a table with all networks and their passwords.

3. Extracting passwords via the Windows registry (for advanced users)

Wi-Fi passwords are stored in the registry in encrypted form, but they can be decrypted using scripts. This method is only suitable for experienced users., as it requires work with Windows API.

Steps for manual extraction:

  1. Open Registry Editor (Win + R → enter regedit).
  2. Follow the path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Wlansvc\Interfaces\{GUID}\Profiles

    (Where {GUID} — the identifier of your Wi-Fi adapter).

  3. In each profile folder, find the parameter Profile (type REG_BINARY) - it contains encrypted data.

To decrypt this data, you will need a script on Python or C#, using the function CryptUnprotectData from Windows CryptoAPIExample code in Python:

from ctypes import *

from ctypes.wintypes import *

class DATA_BLOB(Structure):

_fields_ = [('cbData', DWORD), ('pbData', POINTER(c_ubyte))]

def decrypt(encrypted_data):

blob_in = DATA_BLOB()

blob_out = DATA_BLOB()

blob_in.cbData = len(encrypted_data)

blob_in.pbData = cast(create_string_buffer(encrypted_data), POINTER(c_ubyte))

if windll.crypt32.CryptUnprotectData(byref(blob_in), None, None, None, None, 0, byref(blob_out)):

return string_at(blob_out.pbData, blob_out.cbData).decode('utf-16le')

return None

Example of use (insert your data from the registry)

encrypted_hex = "..." # Your data from the Profile parameter

encrypted_bytes = bytes.fromhex(encrypted_hex)

print(decrypt(encrypted_bytes))

⚠️ Attention: Incorrectly editing the registry may result in loss of all saved Wi-Fi networks or an adapter malfunction. We recommend using this method only if other methods have failed.

4. Where macOS stores Wi-Fi passwords: Keychain Access

On computers MacBook And iMac All passwords (including Wi-Fi) are stored in a bunch of keys (Keychain Access). This is a secure storage facility that only authorized users can access.

To find your password:

  1. Open Spotlight (Cmd + Space) and enter Keychain Access.
  2. In the left menu, select System (or Login, if the network was added by you).
  3. In the search bar, enter the name of your Wi-Fi network.
  4. Double-click on the found entry and check the box. Show password and enter the password for your account macOS.

If the password is not displayed:

  • 🔄 Try searching in the section iCloud - if you have Keychain sync enabled.
  • 🔐 Make sure you have administrator rights on this Mac.
  • 📱 If the network is added via Profile configurator (for example, in an office), the password may be hidden by security policies.

IN macOS Ventura and newer Apple has added additional security: viewing some corporate passwords may require confirmation via Touch ID or Apple Watch.

📊 What kind of computer do you have?
Windows
macOS
Linux
Another

5. Finding Wi-Fi passwords in Linux (Ubuntu, Debian, Fedora)

In Linux distributions, passwords are stored in clear text in configuration files. NetworkManager or wpa_supplicant, but access to them is limited by rights root.

Extraction methods:

  • 🐧 For NetworkManager (Ubuntu, Fedora, Debian):
    sudo grep psk= /etc/NetworkManager/system-connections/*

    The password will be after psk=.

  • 📜 For wpa_supplicant (Arch, Gentoo):
    sudo cat /etc/wpa_supplicant/wpa_supplicant.conf | grep psk
  • 🔍 Via nmcli (universal method):
    nmcli -s -g 802-11-wireless-security.psk connection show "SetiName"

If you use KDE Plasma, passwords can be found in the graphical interface: System settings → Network connections → Select network → Wi-Fi settings → Security.

In some distributions (for example, Linux Mint) configuration files can be located in ~/.config/connman/To read them, use the command:

sudo cat ~/.config/connman/*/settings | grep Passphrase
⚠️ Attention: IN Linux passwords are often stored in in open form, so if other users have access to your PC, they can easily remove them. To protect yourself, set permissions 600 to configuration files:
sudo chmod 600 /etc/NetworkManager/system-connections/*

6. Third-party programs for extracting Wi-Fi passwords

If system methods fail, you can use specialized utilities. They are convenient because they display all saved passwords in a single window and often allow you to export them to a file.

Popular programs:

Program Supported OS Peculiarities Link (Google search)
WirelessKeyView (NirSoft) Windows Shows all passwords in one window, export to .txt/.html wirelesskeyview nirsoft
WiFi Password Revealer Windows Portable version, no installation required wifi password revealer
MacPass macOS An alternative to Keychain Access with advanced features macpass github
WifiPassword (Python) Linux/macOS/Windows Cross-platform terminal script wifipassword python github

Warnings when using third-party software:

  • 🛡️ Download programs only from official websites (For example, NirSoft). Many "cracked" versions of utilities contain viruses.
  • 🔍 Before installation, check the file on VirusTotal.
  • 📋 Some antiviruses (for example, Kaspersky) may block such utilities as "potentially dangerous." This is a false positive—add the program to the exceptions.
What should I do if the program doesn't show the password?

If a utility like WirelessKeyView returns empty fields, the following may be the reasons:

1. The password is stored in the cloud (for example, via a Microsoft account).

2. Network added via Windows Domain (corporate policy).

3. The Wi-Fi profile is damaged (try deleting it and connecting again).

4. You do not have administrator rights (run the program as sudo or administrator).

7. Legal risks: is it possible to extract other people's passwords?

From a technical point of view, extracting passwords from own computer It's completely legal—you have the right to manage your data. However, there are some nuances:

Allowed:

  • 🏠 Extract passwords from your home network (even if the router belongs to the provider).
  • 💼 Use passwords in corporate network, if permitted by the company's internal rules.
  • 🔄 Share your password with family members or colleagues (unless prohibited by your contract with your provider).

Prohibited (under Article 272 of the Criminal Code of the Russian Federation):

  • 🕵️ Extract passwords from other people's devices without the owner's consent.
  • 📡 Connect to closed networks (for example, in a cafe or hotel) without permission.
  • 💰 Sell or distribute passwords from public access points (for example, at airports).

IN In 2023, Roskomnadzor issued clarification that even "borrowing" Wi-Fi from neighbors without their consent could be classified as unauthorized access to computer information (a fine of up to 200,000 rubles).Therefore, if you find a password for someone else's network (for example, through a program on a friend's laptop), it's best not to use it.

8. Common mistakes and how to avoid them

When attempting to extract a password, users often encounter typical problems. Here are the most common ones and their solutions:

🔴 Error: Team netsh returns Key content: missing.

🟢 Solution:

  • Make sure your computer connected at least once to this network.
  • Check if the network profile has been deleted Settings → Network & Internet → Wi-Fi → Manage known networks.
  • If the network is corporate (with 802.1X), the password can be stored on the authentication server.

🔴 Error: IN macOS The password is not displayed even after entering the admin password.

🟢 Solution:

  • Try to find the network in the section iCloud V Keychain Access.
  • If your Mac is connected to a company domain, your password may be hidden by policies. MDM.
  • Restart your computer - sometimes this helps with crashes Security Agent.

🔴 Error: In Linux, the command returns Permission denied.

🟢 Solution:

  • Add sudo in front of the team.
  • If you use Flatpak- terminal version, try the system one (gnome-terminal).
  • Check if access to files is blocked through AppArmor or SELinux.

If none of the methods worked, there is one last option: reset the password on the router (usually you need to press a button to do this Reset for 10 seconds) and configure the network again.

═══

FAQ: Answers to Frequently Asked Questions

Is it possible to extract Wi-Fi password from Android phone?

Yes, but you need it for that root accessWithout it, passwords are stored in encrypted form in /data/misc/wifi/WifiConfigStore.xmlAn alternative is to use apps like WiFi Password Viewer (requires root). iPhone It is impossible to extract the password without jailbreak.

Why is there no "Manage wireless networks" section in Windows 11?

IN Windows 11 Microsoft has moved network management to Settings → Network & Internet → Wi-Fi → Manage known networks. Old control panel (ncpa.cpl) still works, but some features have been removed. To view passwords, you should still use netsh.

Is it possible to recover a password if the computer is not connected to the network?

Yes, the main thing is that the network profile has been saved previously. For example, if you connected to MyWiFi A month ago, but are now disabled, the password will still be in the system. Exception: if the network was removed from known connections or the profile was corrupted.

How to protect your passwords from being extracted?

Here are some ways:

  • 🔐 In Windows: use BitLocker to encrypt the disk.
  • 🍎 In macOS: turn on FileVault and set a complex account password.
  • 🐧 In Linux: restrict rights to /etc/NetworkManager (chmod 700).
  • 🌐 On the router: change the password regularly and disable WPS.

Do these methods work for WPA3 networks?

Yes, encryption type (WPA2 or WPA3) does not affect the storage of passwords in the system. However, in corporate networks with WPA3-Enterprise the password may not be stored locally, but on the authentication server (for example, Radius).