Ever had that moment where a friend asks for your WiFi password and your mind goes blank? Or you just got a new device and need to reconnect, but the password is long gone from memory? Don’t worry — your iMac has likely saved that password in its Keychain, and with a few clicks you can see it in plain text. This guide is for anyone who wants to recover a WiFi password on an iMac running macOS, no matter your tech level.
By the end of this tutorial, you’ll have your WiFi password copied to your clipboard or written down, ready to share or use on another device. We’ll cover the built-in Keychain Access app and a quick Terminal command. Both methods are free, secure, and require no extra software.
What You’ll Need
- Your iMac (any model running macOS 10.10 or later)
- Your iMac’s admin username and password (the one you log in with)
- The exact name (SSID) of the WiFi network you want the password for
- Optional: Terminal app if you prefer the command-line method
Step 1: Open Keychain Access
Keychain Access is macOS’s built-in password manager. It stores all your saved passwords, including WiFi credentials. To open it, click the Spotlight icon (magnifying glass) in the top-right corner of your screen, type “Keychain Access,” and hit Enter. Alternatively, you can find it in Applications > Utilities > Keychain Access.

Step 2: Find Your WiFi Network
In the Keychain Access window, look for the search bar in the top‑right corner. Type the exact name of your WiFi network (the SSID you see when you click the WiFi icon in the menu bar). Make sure you match the case and any spaces. As you type, the list below will filter. Double‑click on the entry that matches your network name.

Step 3: Reveal the Password
A new window will pop up with details about your WiFi network. In the lower‑left corner, there’s a checkbox labeled “Show password.” Click it. You’ll be prompted to enter your Mac’s admin username and password (the same one you use to log in). After you authenticate, the password will appear in the text field next to the checkbox. You can now copy it or write it down. Tip: Be careful not to modify anything else in this window.

Step 4: Alternative Method via Terminal
If you prefer the command line, open Terminal (Applications > Utilities > Terminal). Type the following command, replacing “YourNetworkName” with your actual WiFi SSID:
security find-generic-password -wa “YourNetworkName”
Terminal command
Press Enter. You’ll be asked for your admin password (it won’t show as you type). After entering it, the WiFi password will be displayed in the Terminal window. Copy it before closing. This method is fast and even works for recovering saved passwords on other devices, similar to recovering WiFi passwords without deleting profiles.

Common Pitfalls
- Wrong network name: Make sure you type the exact SSID, including uppercase letters and spaces. If you’ve changed the router’s default name, use that.
- Forgot admin password: You need your Mac’s login password. If you’ve forgotten that, you’ll need to reset it via Apple ID or Recovery Mode before proceeding.
- WiFi network not saved in Keychain: Some enterprise or captive portal networks don’t store the password in Keychain. In that case, you might need to recover your WiFi password from your router directly.
Where to Next
Now you have your WiFi password back in hand. If you want to keep a backup of all your saved WiFi credentials, consider learning how to export saved WiFi passwords to a text file. For Windows users, there are also methods for recovering WiFi passwords without third-party software. And if you ever need to share the password with guests without saying it out loud, try using a QR code to share WiFi credentials. Happy browsing!