How to Recover Your Forgotten WiFi Password on a Desktop Computer

So you’ve forgotten your WiFi password. It happens to the best of us—maybe you set up a long, secure password years ago and never wrote it down, or you just got a new device that needs the key. If you have a desktop computer that’s already connected to that network, you’re in luck. This guide is for anyone who needs to dig that password out of an existing connection. By the end, you’ll have the plain-text password ready to type into any phone, tablet, or guest device.


We’ll cover the three major desktop operating systems—Windows, macOS, and Linux—using only built-in tools. No third-party software required. If your computer is already online, you’re just a few clicks or commands away from recovering that lost password. Let’s get started.


What You’ll Need


  • A desktop or laptop that is currently connected to the WiFi network (wired connection also works if it’s the same network).
  • Administrative privileges on that computer (for Windows and Linux steps).
  • Your macOS user account password (for the Keychain Access method).
  • Basic comfort with typing commands (don’t worry—we’ll show you exactly what to type).


Step 1: Recover WiFi Password on Windows


recover forgotten wifi password on desktop Windows Command Prompt netsh wlan show profile screenshot

Windows stores WiFi passwords in plain text, but you need to access them via the command line. Here’s the quickest way:


  • Press the Windows key and type cmd. Right-click “Command Prompt” and select “Run as administrator”. Accept the UAC prompt.
  • Type the following command and press Enter: netsh wlan show profiles. This lists all saved WiFi networks.
  • Find the name (SSID) of the network you need the password for. Then type: netsh wlan show profile name=”YOUR_NETWORK_NAME” key=clear (replace YOUR_NETWORK_NAME with the actual SSID).
  • Look for the “Key Content” line under “Security settings”. That’s your WiFi password.


If you prefer a graphical method, you can also recover WiFi password on Windows via the Network and Sharing Center. But the command line is faster. For multiple profiles, you can use WiFi password recovery using PowerShell to export them all at once.


Step 2: Recover WiFi Password on macOS

On a Mac, your WiFi password is stored in the Keychain app. Here’s how to reveal it:


  • Open “Keychain Access” from Applications > Utilities (or search with Spotlight).
  • In the search bar, type the name of your WiFi network (SSID). Look for an entry of type “AirPort network password”.
  • Double-click that entry. Check the box “Show password”.
  • Enter your Mac’s administrator username and password when prompted. The password will appear in the field.


That’s it. If you’re on a MacBook Pro, this WiFi password recovery for MacBook Pro method works identically. Just make sure you have the correct login credentials.


Step 3: Recover WiFi Password on Linux


recover forgotten wifi password on desktop Linux terminal nmcli device wifi show-password example

Linux stores WiFi passwords in configuration files, but the easiest way is to use the terminal. These steps assume you’re using NetworkManager (most desktop distros do).


  • Open a terminal. You can usually find it in the applications menu or press Ctrl+Alt+T.
  • First, list your saved connections: nmcli connection show. This shows the connection names.
  • Find the connection name for your WiFi network. Then type: sudo nmcli connection show “CONNECTION_NAME” –show-secrets (replace with the actual name).
  • Look for the “802-11-wireless-security.psk” field. The value next to it is your WiFi password.


Alternatively, you can view the raw config file at /etc/NetworkManager/system-connections/ but the nmcli method is cleaner. For a more detailed walkthrough, see our dedicated guide on WiFi password recovery on Linux.


Common Pitfalls


  • Not running Command Prompt as administrator on Windows – You’ll get an error like “The request is not supported”. Always right-click and choose “Run as administrator”.
  • Forgetting your Mac login password – Keychain Access requires your admin password. If you’ve forgotten that, you’ll need to reset it first or try WiFi password recovery without command line using a different method.
  • Missing NetworkManager on Linux – Some minimal installations or distros use wpa_supplicant directly. In that case, you can recover WiFi password by logging into your router via its web interface.


Where to Next


Now that you’ve recovered your password, consider writing it down somewhere safe—or use a password manager so you never lose it again. If you run into issues with other devices or need to recover passwords from a router reset, check out our other guides. Happy browsing!

Leave a Reply

Your email address will not be published. Required fields are marked *