How to Recover Your WiFi Password Using Open Source Tools (Step-by-Step)

We’ve all been there: a friend asks for your WiFi password, and you draw a blank. Or you set up a new device and can’t find the sticker on the router. The good news? If you’ve ever connected that device to your network, the password is probably still stored on it. And you don’t need any shady third-party software to get it back. In this guide, I’ll show you how to recover your saved WiFi passwords on Windows, macOS, and Linux using free, open source tools that are either built into your operating system or available in official repositories. By the end, you’ll be able to pull up any saved network key in under a minute.


This guide is for anyone who has at least one device that’s currently connected (or was connected in the past) to the WiFi network you want to recover. You don’t need admin rights on every step — but for some methods you’ll need a password or sudo access. I’ll mark those clearly. Let’s dive in.


What You’ll Need


  • A computer running Windows, macOS, or Linux (one device that has connected to the target WiFi)
  • Administrator or sudo privileges (on most steps)
  • A terminal or command prompt (usually already installed)
  • Patience and a sticky note to write down your password


Step 1: Recover WiFi Password on Windows Using Command Prompt


Windows stores your WiFi passwords in plain text (well, encrypted, but the command line can decrypt them for you). This is the quickest method. Open Command Prompt as Administrator: press Win+X, then select “Command Prompt (Admin)” or “Windows Terminal (Admin)”. Type the following command and hit Enter:


You’ll see a list of all saved WiFi networks. Find the one you need, then type (replace NETWORKNAME with the actual SSID):


Look under “Security settings” for the “Key Content” line. That’s your password. This method is one of the most common ways to view saved wifi password using cmd, and it works on Windows 7 through 11.


wifi password recovery open source Windows Command Prompt netsh wlan show profile key clear output showing Key Content

Step 2: Recover WiFi Password on macOS Using Keychain


On a Mac, your WiFi passwords are stored in the Keychain Access app, which is a built-in password manager. However, the quickest way from the terminal uses the `security` command. Open Terminal (from Applications > Utilities). Then type:


Replace NETWORKNAME with the exact SSID. You’ll be prompted for your Mac’s login password (not the WiFi password). After entering it, the WiFi password appears in plain text. This method is a classic example of wireless password recovery iphone? Actually it’s for Mac, but the same principle applies to iCloud Keychain synced devices.


wifi password recovery open source macOS Terminal security find-generic-password command output showing WiFi password

Step 3: Recover WiFi Password on Linux Using nmcli


Most Linux distributions use NetworkManager, and the `nmcli` command-line tool can show saved passwords. Open a terminal and run:


If that doesn’t work, you can also cat the connection file directly (requires sudo):


The password will appear after `psk=`. This is a solid wifi password recovery command for linux that works on Ubuntu, Fedora, and many others.


wifi password recovery open source Linux terminal nmcli command showing WiFi password psk output

Step 4: (Optional) Recover from a Router That’s Still Running Open Source Firmware


If you have physical access to the router and it runs open source firmware like DD-WRT, OpenWrt, or Tomato, you can SSH into it and find the password in the configuration file. For example, on OpenWrt:


This is more advanced but good to know for wifi password recovery for beginners who also manage their own routers.


wifi password recovery open source SSH terminal showing uci command output with WiFi key on OpenWrt router

Common Pitfalls


  • You’re not running the command as administrator/sudo: The commands in Steps 1 and 3 require elevated privileges. If you get “access denied”, right-click and run as admin (Windows) or prepend `sudo` (Linux).
  • SSID name mismatch: The SSID must be typed exactly, including spaces and capitalization. Use quotes if there are spaces. On macOS, the `security` command is case-sensitive.
  • The device never saved the password: If you always connect via WPS or a guest network that doesn’t store the key, these methods won’t work. In that case, you’ll need to reset the router or use the admin panel.


Where to Next


Now that you’ve recovered your password, consider backing it up safely. Check out our wifi password recovery maintenance guide for tips on keeping keys secure. If you use multiple devices, you might also be interested in how to sync passwords across platforms. And remember, for a broader overview, our wifi password recovery for beginners article covers all the basics.

Leave a Reply

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