Forgot your home or office Wi-Fi password, but your MacBook or iMac automatically connects to the network? This situation is familiar to many people - especially if someone else set up the network and now you need to connect a new device. Luckily, macOS stores all saved passwords in a secure vault., and they can be extracted without third-party programs.
In this article you will find 5 working methodsHow to view your Wi-Fi password Mac OS — from the simplest (through a graphical interface) to advanced (using Terminal). All methods have been tested on the latest versions of the system: Ventura, Sonoma And Monterey, but most of them work on older builds as well. If you're unsure of your skills, start with the first section—it doesn't require command knowledge or administrator privileges.
Important: All methods assume that your Mac is already connected (or at least has been connected) to the desired Wi-Fi network.If the network isn't in the list of saved networks, you'll have to reset the router or contact the administrator.
1. The easiest way: via Keychain Access
Keychain Access is a built-in macOS storage for passwords, certificates, and other sensitive data. This is where the system stores everything Wi-Fi network passwords, which you've ever connected to. To find them:
- Open Spotlight (click
Command + Space) and type "Keychain Access" (or Keychain Access (on the English keyboard layout). Launch the application. - Select a category in the left column
System(orSystem), and on the right, find the name of your Wi-Fi network in the list. - Double-click on the network name to open the properties window.
- Check the box next to
Show password(Show password). The system will ask for your account password. Mac - enter it. - The Wi-Fi password will be displayed in the field.
Show password.
If the network is not listed, check the category iCloud — the password may have been synced via the cloud. Also, make sure you're looking for the exact network name (case is important!).
Make sure the "System" section is selected.
Make sure you are entering the correct password for your Mac account.
Try searching for the network in the "iCloud" category.
Restart Keychain Access (sometimes helps)
Check if the password is hidden behind asterisks (click on the field)-->
⚠️ Attention: If you use Mac At work or school, access to Keychain may be restricted by your administrator. In this case, try other methods or contact your IT support.
2. How to find out the password through the Terminal (for advanced users)
If you are more comfortable working with the command line, you can extract the Wi-Fi password using TerminalThis method does not require administrator rights, but it requires knowledge of the exact name of the network.
Open Terminal (through Spotlight or on the way /Programs/Utilities/) and run the following command, replacing NAZVANIE_SETI to the name of your Wi-Fi network:
security find-generic-password -wa "NAZVANIE_SETI"
After entering, the system will ask for your account password. Mac — enter it. If everything is done correctly, the terminal will display the Wi-Fi password.
Example for a network with the name MyWiFi_5G:
security find-generic-password -wa "MyWiFi_5G"
What should I do if the Terminal displays the error "Could not find password"?
This means either the network name is entered incorrectly (check the case and spaces), or the password is not saved in the keychain. Try:
1. Make sure that your Mac has actually connected to this network before.
2. Check the network name in the Wi-Fi settings (click on the Wi-Fi icon in the menu bar while holding down Option).
3. Use another method from this article.
This method is especially useful if you need automate password extraction (for example, for a script). It also works in macOS Recovery Mode, if you need to restore network access after a system reset.
3. Viewing the password through the router settings (universal method)
If your Mac did not save the password (for example, you connected manually), but you have access to router, you can find the password directly from its settings. This method works regardless of the operating system and is suitable even if you have forgotten your account password. Mac.
Instructions:
- Find out Your router's IP addressTo do this:
- Open
Terminaland enter the command:netstat -nr | grep default - In line with
defaultthe IP will be indicated (usually192.168.0.1,192.168.1.1or10.0.0.1).
- Open
admin/admin or admin/password).Wireless, Wireless network or WLAN).Password, Key or Pre-installed key.| Router manufacturer | Typical IP address | Default login/password |
|---|---|---|
| TP-Link | 192.168.0.1 or 192.168.1.1 |
admin/admin |
| ASUS | 192.168.1.1 |
admin/admin |
| D-Link | 192.168.0.1 |
admin/(empty) |
| Keenetic | 192.168.1.1 |
admin/1234 |
| MikroTik | 192.168.88.1 |
admin/(empty) |
⚠️ Attention: If you can't log into your router with the default credentials, it means the password has been changed. In this case, the only solution is to reset the router to factory settings (using the button). Reset on the back panel), but this will delete all current settings, including the Wi-Fi password.
4. Using Wireless Diagnostics (a hidden macOS tool)
MacOS contains a hidden utility Wireless Diagnostics, which can not only help diagnose Wi-Fi problems but also extract saved passwords. This method is less well-known, but it works reliably.
How to run:
- Hold down the key
Option(Alt) and click on the icon Wi-Fi in the menu bar. - From the drop-down menu, select
Open Wi-Fi diagnostics(Open Wireless Diagnostics). - In the window that opens, ignore the diagnostic wizard and go straight to the menu
Window(Window) →Summary(Summary). - In the lower right corner, click
Show additional information(Show more info). - Find the section
Security— the type of protection will be indicated here (for example,WPA2 Personal) and the password itself. - 🔹 WiFi Password Revealer — a free utility that displays all saved Wi-Fi passwords in a single window. No installation required.
- 🔹 MacPass — a password manager with Keychain import support. Allows you to export passwords to a secure file.
- 🔹 WifiSpoof — an advanced tool for managing Wi-Fi connections, including a password viewing function.
- 🔄 The Mac has never connected to this network. — in this case, the password simply isn't saved. Try connecting again or reset the router.
- 🔒 The password was changed after the last connection. - if the network has been reconfigured (for example, the password on the router has been changed), the old password macOS will become irrelevant.
- 👤 Account restrictions — If you use a guest account or an account with limited rights, access to Keychain may be blocked.
- 🛡️ Firewall or antivirus is blocking access - Temporarily disable protection and try again.
If the password is not displayed, try another method. This utility is useful if you need diagnose connection problems in parallel with password extraction.
Via Keychain Access
Using the Terminal
Through the router settings
Wireless Diagnostics Utility
Haven't tried it yet-->
5. Alternative methods: third-party programs and scripts
If built-in tools macOS didn't help, you can use third-party utilitiesThey usually offer a more user-friendly interface, but require caution—download software only from official sources.
Popular programs:
Warning: Some antivirus programs may block such programs because they work with system data. Never enter your Mac account password into unknown utilities—this may lead to data leakage.
If you prefer automation, you can write a simple AppleScript To extract the password:
tell application "System Events"tell current application
do shell script "security find-generic-password -wa 'NAZVANIE_SETI' | sed 's/password: \"//' | sed 's/\"//'" with administrator privileges
end tell
end tell
Save the script in Script Editor and run it by replacing NAZVANIE_SETI to the name of your network.
6. What to do if none of the methods worked?
If you've tried all the methods and still can't find the password, check the following:
If the problem is with the router (for example, it gives an error when logging in), try:
- Connect to it via cable (
Ethernet) - sometimes this allows you to bypass Wi-Fi restrictions. - Reset the router settings using the button
Reset(hold for 10-15 seconds). - Contact your provider—some operators block access to router settings (especially if it’s rented).
FAQ: Frequently Asked Questions About Wi-Fi Passwords on Mac
Is it possible to find out the password for the Wi-Fi my Mac connected to a year ago?
Yes, if the network is saved in Keychain. MacOS Stores passwords indefinitely until you delete them manually. Check the category System or iCloud V Keychain Access.
Why does Terminal ask for my account password if I'm already logged in?
This is a security measure - macOS requires confirmation to access protected data, even if you're logged in. Enter the password for your account (the user you're logged in as).
Is it possible to export all Wi-Fi passwords from Keychain?
Yes, but not in clear text. You can export the entire bundle to an encrypted file (.keychain), but to view passwords you will need to enter the master password. To export:
- Open Keychain Access.
- Select
File→Export elements.... - Specify the format
.keychainand save the file.
Do these methods work on Macs with M1/M2 chips?
Yes, all the methods described are fully compatible with Mac on Apple Silicon (M1, M2, M3). The processor architecture does not affect the operation of Keychain or Terminal.
How to protect your passwords from strangers?
To prevent unauthorized access:
- Set a strong password for your account Mac.
- Disable automatic login (
System Preferences → Users & Groups → Login Options). - Use
FileVaultfor disk encryption (System Preferences → Security & Privacy). - Do not leave your Mac unattended in public places.