Have you ever forgotten your home Wi-Fi password but remembered your computer had connected to that network before? Or needed the password for a guest network you connected to a month ago? In Windows, macOS, and Linux operating systems, wireless network passwords are stored encrypted, but they can be retrieved without any special knowledge. This article will explain how. Where exactly are Wi-Fi passwords stored on a computer?, how to obtain them safely, and what to do if standard methods don't work.
We'll cover official methods through the OS interface, hidden system files, the command line, and even third-party utilities—with explanations of when each method is appropriate. Important: all steps are performed locally on your device, without transmitting data to the network. But remember that accessing someone else's passwords without permission may be illegal (in some countries, this is considered unauthorized access to computer information).
1. Where are Wi-Fi passwords physically stored in Windows?
IN Windows 10 And Windows 11 Wireless network passwords are stored in two places:
- 📁 Windows Registry — encrypted data in the branch
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Wlansvc\Interfaces. - 🗄️ System configuration files — in the folder
C:\ProgramData\Microsoft\Wlansvc\Profiles\Interfaces(requires administrator rights). - 🔑 Credential Manager - graphical interface for viewing saved passwords (
Control Panel → Credentials).
The password itself is stored in encrypted using API CryptProtectData, and it can't be read directly from the file—only through system utilities or APIs. However, Windows provides legal methods for extracting the password for networks to which the device has previously connected.
2. How to view your Wi-Fi password using Windows Settings (without using any software)
The easiest way is to use the built-in network settings. This works if:
- 🖥️ Computer already connected to the desired network (or connected previously).
- 👤 You have rights administrator (or you know the admin password).
- 🔄 Network saved in profiles (
Settings → Network & Internet → Wi-Fi → Manage known networks).
Instructions:
- Open
Settings → Network and Internet → Wi-Fi. - Click
Managing known networks. - Select the desired network and click
Properties. - Scroll to section
Network passwordand pressShow(you will need to enter the administrator password).
Make sure your computer is connected to the network (or has been connected previously)
Check your administrator rights
Open Settings via the Start menu or Win+I
Be prepared to enter your admin password when prompted-->
⚠️ Attention: If the button Show inactive, means:
- The network is connected via WPS (password is not saved).
- The network profile is damaged or deleted.
- The user does not have administrator rights.
3. Extracting the password via the command line (CMD)
For experienced users it is more convenient to use command line (CMD). This method works even if the network is not active but is saved in profiles. The main command is:
netsh wlan show profile name="NETWORK_NAME" key=clear
Where NETWORK_NAME — the exact network name (case-sensitive!). For example, for the network MyWiFi_5G the command will be:
netsh wlan show profile name="MyWiFi_5G" key=clear
Find the block in the output Security parameters - there will be a line Key content with a password. If the command returned an error Profile not found, Means:
- 🔍 The network has never connected to this computer.
- 🗑️ The profile was deleted manually.
- 🔄 The network name was entered incorrectly (check your capitalization!).
4. Alternative Method: PowerShell for Advanced Users
PowerShell offers more flexible options for working with Wi-Fi profiles. For example, you can export all saved passwords to a text file:
(netsh wlan show profiles) | Select-String "\:(.+)$" | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name="$name" key=clear)} | Out-File "WiFi_Passwords.txt"
This command:
- Gets a list of all Wi-Fi profiles.
- For each profile, it extracts data (including password).
- Saves the result to a file
WiFi_Passwords.txton the desktop.
⚠️ Attention: File WiFi_Passwords.txt contains all passwords in clear text. Delete it after use if there are other users on the computer!
5. Where are Wi-Fi passwords stored on macOS and Linux?
Users macOS And Linux They can also extract saved passwords, but the methods differ from Windows.
| operating system | Command/Storage Location | Notes |
|---|---|---|
| macOS (before Ventura) | security find-generic-password -wa "NETWORK_NAME" |
You will be asked to enter the user password. In newer versions, you may be asked for permission. System settings. |
| macOS (Ventura and later) | System Settings → Wi-Fi → ... → Password |
The password is displayed after authentication via Touch ID or account password. |
| Linux (NetworkManager) | sudo grep psk= /etc/NetworkManager/system-connections/"NETWORK_NAME" |
The password is stored in the network configuration file. Permissions required. sudo. |
| Linux (wpa_supplicant) | sudo cat /etc/wpa_supplicant/wpa_supplicant.conf |
The password may be encrypted - look for the line psk="...". |
IN Linux The location of the configuration files depends on the distribution and network manager. For example, in Ubuntu With NetworkManager passwords are stored in /etc/NetworkManager/system-connections/, and in Arch Linux can be used wpa_supplicant.
What to do if a command in Linux returns an error?
If the team sudo grep psk=... can't find the file, try:
1. Make sure the network is saved (nmcli connection show).
2. Check alternative routes: /var/lib/NetworkManager/ or /run/NetworkManager/.
3. Use the graphical interface: nmtui (in the terminal).
6. Third-party password extraction programs
If system methods don't work, you can use specialized utilities. Popular options include:
- 🛠️ WirelessKeyView (from NirSoft) - shows all saved Wi-Fi passwords in Windows, including hidden networks.
- 🔍 WiFi Password Revealer — a simple interface for viewing passwords without the command line.
- 🖥️ Magical Jelly Bean WiFi Password Revealer — exports passwords to a file
.txtor.csv.
⚠️ Attention: Programs from NirSoft are often blocked by antivirus programs as "potentially dangerous." This is a false positive (the utilities do not contain viruses), but:
- Download programs only from the official website.
- Before use, disable your antivirus (temporarily).
- After extracting the password, delete the utility if you don't need it.
7. Is it possible to recover a password if the computer was not connected to the network?
No. If the computer never connected to the desired network, then:
- 🚫 There will be no network profile in Windows
netsh wlan show profiles. - 🚫 In macOS, the command
security find-generic-passwordwill return an error. - 🚫 In Linux, the network configuration file is
/etc/NetworkManager/does not exist.
The only exceptions are:
- 🔄 The computer was connected to the network via USB modem (for example, from a phone) - the password can be stored in the modem settings.
- 💾 The password was manually saved in a password manager (for example, KeePass or 1Password).
- 🖧 The network was distributed from this computer (hot spot) - the password can be found in the distribution settings.
In other cases you will have to:
- Contact the network administrator (for example, in a cafe or hotel).
- Reset your router (if this is your router) and set it up again.
- Use alternative methods (for example, connect to the router via cable and view the password in its web interface).
FAQ: Frequently asked questions about Wi-Fi passwords on your computer
Is it possible to find out the password for a Wi-Fi connection that another computer on the network has connected to?
No, passwords are stored. locally On each device. If the other computer hasn't saved your password to the cloud (for example, via a Microsoft account), it's impossible to retrieve it remotely. The exception is if you have physical access to that computer (or its hard drive).
Why the team netsh wlan show profile doesn't show password?
Possible reasons:
- The network was connected via WPS (password is not saved).
- The network profile is corrupted (try deleting and connecting again).
- You are using guest account without administrator rights.
- The password is stored in cloud (for example, via a Microsoft account) - try signing in with your account.
Is it safe to use programs like WirelessKeyView?
Yes, if you download them from NirSoft official websiteThese utilities do not send data to the Internet and do not contain viruses. However:
- Antivirus programs may block them as "potentially dangerous" (due to password extraction functions).
- Do not use pirated or modified versions - they may contain malicious code.
- After using, uninstall the program if you do not need it constantly.
Is it possible to extract Wi-Fi password from Android phone or iPhone?
Yes, but the methods are different:
- Android (with root rights): Passwords are stored in
/data/misc/wifi/WifiConfigStore.xml. Can be viewed through Root Explorer or application WiFi Password Viewer. - Android (without root): On some firmware (for example, MIUI or EMUI) the password is displayed in the Wi-Fi settings (click on the network → “Share password”).
- iPhone: Passwords are synchronized via iCloud KeychainTo see the password, go to
Settings → Wi-Fi → ⓘ → Password(Face ID/Touch ID required).
What should I do if my password is displayed as dots or asterisks?
In Windows:
- Right-click on the password field →
Show(if available). - Use
netsh wlan show profilein the command line. - Copy the password to the clipboard (sometimes it helps to paste it into notepad to see the characters).
On macOS/Linux: The password is always displayed in cleartext when using the correct commands (see section 5).