A situation when you need to connect a new device to your home network, but you have forgotten the password, and you only have the one that is already connected at hand MacBook, is quite common. Users are often surprised to learn that macOS stores this data in plain text, protected only by your account's master password. This isn't a security bug, but a well-thought-out feature for convenient syncing across devices in the ecosystem. Apple.
Unlike Windows, where access to stored encryption keys is more deeply hidden, on a Mac you can find the required code using standard system utilities. You don't need third-party software or complex command line manipulation, although such methods are available for experienced users. The main thing is to have physical access to the computer and know the login password.
There are several current methods for extracting data, depending on the operating system version. Owners macOS Ventura Users of Windows 10 and newer will find the interface much more user-friendly, while older versions will require the classic Keychain. Below, we'll break down all the options so you can choose the one that best suits your setup.
Using iCloud Keychain on newer versions of macOS
Since version macOS VenturaApple has completely redesigned network settings, making them similar to the iPhone interface. Now you can view your saved key directly in the system settings, without having to open separate utilities. This significantly simplifies life for regular users who don't need technical details.
To get started, open the Apple menu in the upper left corner of your screen and select System Preferences. In the left column, find the section Wi-Fi and tap on it. You'll see a list of known networks, and an icon with three dots or a "More details" button will appear next to the active or previously used access point.
Click this icon to expand the detailed menu. In the "Password" field, the characters will be hidden by asterisks. Simply click on them or the copy button, and the system will request authorization via Touch ID or an administrator password. After confirmation, you will see the required code in text format.
⚠️ Important: If the password field cannot be edited or copied, make sure your account has administrator rights. Guest users often have limited access to system security keys.
This method only works on current versions of the operating system. If your MacBook works on Catalina or Mojave, the interface will look different, and you will have to use the classic method through the keychain utility, described below.
The classic method via the Keychain utility
For users of older versions of macOS or those who prefer the classic interface, Keychain Access remains the primary tool. It's a centralized repository for all passwords, certificates, and keys ever stored on your computer. You can find this utility using Spotlight search by clicking Cmd + Space and entering the name.
After launching the app, select "System" or "iCloud" in the left panel, depending on where the password was saved. Then, go to the "Passwords" tab. In the list, which can be quite extensive, find the name of your Wi-Fi network. The list is sorted alphabetically, making it easy to find.
Double-click the found network name. A properties window will open, where you should check the "Show password" box. The system will immediately prompt you to enter your Mac user account password (or use Touch ID). After entering the information, the required access key will appear in the text field.
| Interface element | User action | Result |
|---|---|---|
| Search bar | Entering a network name | Filtering the password list |
| Double click | Opening properties | Access settings window |
| Show checkbox | Activation | Administrator authorization request |
| Input field | Entering a Mac password | Display hidden WiFi key |
It is important to understand that Keychain Access is a critical system component. Do not delete and do not change other entries in this list unless you are sure of their purpose, as this may cause problems with email clients, browsers, and network connections.
Using the Terminal for Advanced Users
For those who prefer the command line to a graphical interface, macOS provides powerful tools through TerminalThis method allows you to obtain the password with a single command, which is especially convenient if you need to quickly copy it and paste it into a router configurator or other device without a screen.
Open the Terminal application (located in the Applications → Utilities folder). To obtain the password, use the command security, which accesses the system key database. The syntax requires an exact network name (SSID).
security find-generic-password -wa "YourNetworkName"
Replace "YourNetworkName" with your actual WiFi network name, enclosed in quotation marks if it contains spaces. After entering the command and pressing Enter, the system will ask for permission to access the key. Click "Always Allow" or enter the administrator password, and the terminal will display the password in plain text without unnecessary characters.
What should I do if the terminal displays "Password could not be found"? This means the computer has never connected to this network, or you misspelled the name (case is important). Check the exact name in the WiFi menu.
The advantage of this method is its speed and the possibility of automation. However, be careful
When you enter a command into the terminal, the history is saved, and anyone with access to your computer will be able to see which network you were testing, although the password itself is not displayed in the command history.
View your password on iPhone or iPad
If your MacBook and a mobile device iPhone or iPad If you use the same Apple ID and have Keychain sync enabled, you can find your password directly on your smartphone. This is often more convenient, especially if your computer is busy or in sleep mode.
On a device with iOS 16 or later (or iPadOS 16+), go to Settings → Wi-FiFind the network you need the password for and tap the blue information icon ("i") to the right of the name. Tap the "Password" field, hidden by dots.
The system will perform biometric authentication (Face ID or Touch ID) or ask you to enter a passcode. Afterwards, the characters will become visible and can be copied. Thanks to the ecosystem, this passcode will also work on your MacBook, as they are synced.
This method only works if iCloud Keychain is enabled. You can check this in the iCloud settings on both devices. If syncing is disabled, passwords will be stored locally on each device separately and will not be transferred between them.
Possible problems and solutions
Even following the instructions, users may encounter errors. Most often, the problem stems from data desynchronization or a corrupted keychain file. If the system repeatedly prompts for a password or returns an access error, try restarting the computer. This simple step often resolves temporary process conflicts.
Another common situation is changing the router password. If you've changed the access key in the router settings, but your MacBook tries to connect with the old password, an error will occur. In this case, you need to "forget" the network on your MacBook (via Wi-Fi settings) and reconnect using the new password.
If your Keychain is corrupted, you may need to reset it. This is a last resort, as it will delete all saved passwords. To do this, in the Keychain utility, select Edit → Reset my keychain to default. You'll then have to re-enter your passwords for all services the first time you sign in.
⚠️ Warning: Resetting your keychain will result in the loss of all saved passwords if they weren't synced with iCloud. Make sure you have backups of critical data before performing this operation.
☑️ Diagnosing access issues
It's also worth considering that corporate networks often use security certificates rather than simple passwords. In such cases, standard access methods may not work, as access is controlled by the organization's security policies, not the user's private key.
Security measures for storing passwords
Knowing how to easily access saved passwords on a Mac highlights the importance of physical device security. Anyone who gains access to an unlocked computer or knows your login password can easily obtain the keys to all your networks. Therefore, using a strong password for your macOS account is essential.
It's recommended to regularly review the list of saved networks in Keychain and delete those you no longer use. This reduces the potential attack surface and helps keep your system settings organized. This is especially important for public networks you connect to while traveling.
Using third-party password managers can add an additional layer of encryption, but for WiFi keys, the system keychain remains the most integrated and convenient solution. The main thing is to remember to update the system to receive the latest security patches.
Remember that the security of your home network depends not only on the strength of your WiFi password, but also on the security of the devices that already have access to it. Regularly auditing connected devices and their access rights is a good habit for any user.
Is it possible to find out the password if the MacBook is not currently connected to this network?
Yes, you can. If you've previously connected to this network and saved the password in your keychain, you'll be able to view it using the Keychain utility or Terminal, even if the network is currently unavailable or you're far from the router.
What should you do if you've forgotten your MacBook's password?
Without the administrator account password, macOS won't allow you to view saved keys. In this case, you'll first have to reset or restore access to the computer via your Apple ID or recovery mode before you can view the network settings.
Where are passwords stored on MacBook Air M1/M2?
On new Apple Silicon processors, data is stored in a secure enclave, making it virtually impossible to extract by physical means, but software access via an authorized user remains the same as described above.
Do WiFi passwords sync with Windows?
No, iCloud Keychain only works in the Apple ecosystem (macOS, iOS, iPadOS). On Windows, WiFi passwords are not transmitted via iCloud, even if the iCloud for Windows client is installed. It uses a separate storage solution.