Forgetting a wireless network password doesn't mean you're locked out for good. Whether you're trying to connect a new smart home device, set up a guest's laptop, or recover credentials after a reset, your devices and routers store these keys in plaintext or recoverable formats. You don't need expensive third-party tools or sketchy software downloads; your operating system already holds the answer if you have administrative rights.
Retrieving lost credentials requires administrative access to the machine currently connected to the network or physical access to the router. This guide walks through exact command-line steps, keychain lookups, and router interface walkthroughs across Windows, macOS, mobile devices, and home networking hardware.
How Wi-Fi Credentials Are Stored on Your Devices
When your computer or phone joins a wireless network, it doesn't just handshake once and forget the key. The operating system saves the Service Set Identifier (SSID) alongside the Pre-Shared Key (PSK) in a localized configuration profile. This allows your hardware to automatically handshake with the router whenever you walk back into range.
Because these profiles are stored locally, operating systems provide built-in administrative mechanisms to view them. However, security protocols intentionally restrict access. You generally need to enter your local device password, terminal admin privileges, or physical credentials to extract them.
Viewing Wi-Fi Passwords on Windows 10 and 11
Windows stores every wireless profile in XML format via the WLAN AutoConfig service. If you've connected to the network before, the plain-text key is sitting right inside that profile data. You can pull it using either Command Prompt or PowerShell with administrator rights.
Using Command Prompt
- Click the Start menu, type
cmd, right-click Command Prompt, and select Run as administrator. - Type the following command to view all saved networks on your machine:
netsh wlan show profile - Locate the exact name of your target network under User Profiles.
- Run the key extraction command, substituting your network's name in quotes:
netsh wlan show profile name="YourNetworkName" key=clear - Look down the output to the Security Settings block. The exact password sits next to Key Content.
Using PowerShell
PowerShell offers a quick way to filter out the noise and output just the key string. Open PowerShell as an administrator and run:
(netsh wlan show profile name="YourNetworkName" key=clear).xml | Select-String "Key Content"
This method saves you from scrolling through blocks of cipher parameters and MAC address filters.
Viewing Wi-Fi Passwords on macOS
Apple handles wireless credentials through the Keychain Access utility or the system security command line. Since macOS encrypts these credentials tightly, you'll need your system login password or Touch ID verification to view them.
Using Keychain Access
- Open Finder, navigate to Applications, then Utilities, and open Keychain Access.
- In the top-right search bar, type the exact name of your Wi-Fi network.
- Double-click the item matching your network name (labeled as an AirPort network password).
- In the pop-up window, check the box next to Show password.
- macOS will prompt you for your Mac administrator username and password. Enter them to authorize the view.
Using the Terminal
If you prefer the command line, macOS has a built-in security binary that queries the local keychain instantly. Open Terminal and run:
security find-generic-password -wa "YourNetworkName"
Input your system password when prompted, and the plaintext password will print directly to your terminal window. For broader context on network safety, consult the NIST Guidelines on Network Security.
Finding Passwords via the Router Dashboard
If your computer or phone hasn't saved the network profile, or if you're locked out of all client devices, the router itself is your source of truth. Every consumer router runs an internal firmware dashboard where the wireless configuration is set and displayed.
Steps to Access Router Settings
- Connect a computer or phone to the network via an Ethernet cable or an active Wi-Fi connection.
- Open a web browser and enter the router's default gateway IP address into the URL bar (common defaults include
192.168.1.1,192.168.0.1, or10.0.0.1). - Enter your router administrator username and password. If you've never changed them, check the physical sticker on the bottom of the router unit or reference the CISA Home Router Security Guidance.
- Navigate to the Wireless, Wi-Fi, or Wireless Settings tab.
- Look for fields labeled Wireless Password, Pre-Shared Key, or Security Key. Click the eye icon or unmask toggle to view the text.
If you've lost the router admin password entirely, you'll need to perform a physical factory reset by holding down the recessed reset button on the back of the device for 10 seconds. Keep in mind that this wipes all custom network names and passwords, returning the router to its factory-default sticker credentials.
Handling Mobile Devices (Android and iOS)
Modern mobile operating systems add layers of abstraction to protect user credentials, making direct plaintext viewing difficult without advanced modifications.
On Android 10 and newer, you can view network QR codes by going to Settings, selecting Network & internet, tapping Wi-Fi, and choosing the connected network to share via QR code. Scanning that code with another device reveals the embedded password string.
On iOS, Apple restricts direct viewing of saved Wi-Fi passwords within standard menus. However, if your devices are synced via iCloud Keychain, you can easily pull the password on a linked Mac using the Keychain Access method outlined earlier. For additional reading on device privacy controls, visit Apple's Official Support Documentation.
Common Mistakes to Avoid
When attempting to recover network credentials, users often run into avoidable roadblocks. Keep these common pitfalls in mind:
- Typing SSID case incorrectly: Command-line tools like
netshare case-sensitive. If your network is named "Home_Network", typing "home_network" will return an error stating the profile is not found. - Using standard user prompts: Running Windows commands without administrative privileges will show the profile summary but omit the security key block entirely.
- Confusing router admin login with Wi-Fi password: The password you use to log into
192.168.1.1is often entirely different from the Wi-Fi broadcast key your devices use to connect to the internet. - Forgetting recent changes: If you updated your Wi-Fi password last month on one device, older offline devices will still hold the obsolete key in their profiles.
Frequently Asked Questions
Can I view a Wi-Fi password without administrator access?
No. Operating systems protect stored network keys behind strict administrative boundaries. You must either have admin rights on the computer, physical access to log into the router, or root permissions on a mobile device to extract plain-text credentials.
What happens if I forget my router admin password?
If you cannot log into your router's web interface, your only option is to factory reset the hardware. Locate the small physical reset button on the back of the router, hold it down with a paperclip for about 10 seconds, and log back in using the default credentials printed on the physical device label.
Is it legal to view a saved Wi-Fi password on a shared computer?
Retrieving passwords for networks you own, manage, or have explicit permission to access is legal and routine. Extracting credentials from devices or networks without authorization violates computer fraud laws and organizational policies.
Why won't my Windows command prompt show the key content?
If the netsh command returns an error stating that the wireless profile is not on the system, it means the computer has forgotten the network or you've never successfully authenticated to it. Reconnect to the network once, save the profile, and run the command again.