Needing to connect a new device to a wireless network but losing or forgetting the password is a fairly common situation. Apple device owners encounter this less frequently thanks to the ecosystem, but when changing router settings or purchasing a new device, the issue becomes pressing. Fortunately, macOS stores data about previously used networks in a secure vault, accessible via standard tools.
In this article, we will look at several proven methods that will allow you to restore access to credentials your network. You'll learn how to use the built-in Keychain utility, how to request data via the command line, and how to sync passwords via iPhone. These methods are applicable to most versions of macOS, from older versions to the latest Ventura and Sonoma.
Before you begin, make sure your MacBook has previously connected to the network you're trying to restore. If the device has never connected to the network, software-based password recovery won't work—you'll need physical access to the router or the network administrator's password. The recovery process is safe if you own the device.
Using iCloud Keychain
The most reliable and easiest way to save a password is to use a system utility Bunch of keysThis tool manages all cryptographic information on your Mac, including website passwords, certificates, and Wi-Fi data. The program's interface may seem complicated to a beginner, but the workflow is very straightforward and easy to understand.
First, open the utility. The easiest way to do this is through Spotlight search by pressing the key combination Command + Space and entering the program name. In the window that opens on the left, select the "Passwords" category or find the desired network in the general list. Please note that you will need to enter your Mac user account password or use Touch ID to view the data.
⚠️ Attention: If you're using a corporate MacBook, access to Keychain may be restricted by your security administrator. In this case, standard viewing methods may be blocked by company policies.
Once you've found the desired network name (SSID), double-click it. In the properties window that opens, check the "Show password" box. The system will prompt you to confirm your identity, and after successful authorization, the hidden text will become visible. This makes it easy to copy security key for use on other devices.
Restoring access via Terminal
For users who prefer the command line or don't have access to the graphical interface, there is an alternative method. The utility Terminal Allows you to interact with system services directly. This method may seem more complex, but it produces accurate results and is often faster than searching through menus.
Open Terminal via Spotlight or find it in Applications → Utilities. To obtain the password, use the security command, which accesses the keystore. You'll need to know the exact name of your network. Enter the following, replacing "NetworkName" with your SSID:
security find-generic-password -wa"Network_Name"
After entering the command, the system will ask for permission to access the key. Click "Always allow" or enter the administrator password. Terminal will prompt you for a cleartext password. This method is especially useful if you need to quickly obtain data for a script or automation without opening additional windows.
It is worth noting that in the latest versions of macOS, the syntax of commands may change slightly, but the basic structure of the request to security has remained unchanged for many years. If the command doesn't work, check the spelling of the network name, taking into account the case of the letters. A single character error will result in access being denied.
Sync via iPhone or iPad
Owners of devices in the Apple ecosystem have a unique advantage: iCloud Keychain. If your iPhone and MacBook use the same Apple ID, Wi-Fi passwords sync automatically. This means you can find the password for the network your Mac is connected to by looking at the settings on your phone, and vice versa.
On devices with iOS 16 and later, as well as iPadOS, the viewing process is even easier. Open Settings on your iPhone and go to Wi-Fi. Find the network you need to know the password for and tap the information icon (the blue "i" in a circle). Tap the dotted line next to "Password."
- 📱 Biometric authentication system (Face ID or Touch ID).
- 👁️ Once confirmed, the dots will turn into readable text.
- 📋 You can copy the password and send it to yourself in messages or notes.
This method is ideal if your MacBook screen is damaged or the system is frozen, but you have your phone at hand. Synchronization This happens in the background, so the data is always up-to-date. The main requirement is that both devices have an active internet connection when the data is updated.
☑️ Checking synchronization conditions
Viewing through router settings
If none of the software methods on the computer itself help, the only option is to turn to the source of the signal—the router. The router's web interface contains all network settings, including the current password. To access it, you'll need to connect to the router (via cable or Wi-Fi, if you know the password) and know the login address.
Typically the address to enter the settings looks like this 192.168.0.1 or 192.168.1.1Enter this IP address into your browser's address bar. You'll be asked to enter your administrator username and password. If you haven't changed them, they're often found on a sticker on the bottom of the device (standard pairs: admin/admin).
| Router brand | Typical login address | Standard login | Standard password |
|---|---|---|---|
| TP-Link | tplinkwifi.net / 192.168.0.1 | admin | admin |
| ASUS | router.asus.com / 192.168.1.1 | admin | admin |
| Zyxel | 192.168.1.1 | admin | 1234 |
| D-Link | 192.168.0.1 | admin | (empty) |
After logging in, find the "Wireless" or "Wi-Fi" section. The current encryption key will be displayed in the Security settings. Here you can also change your password to a more complex oneIf you suspect someone has connected to your network, please save your changes before exiting.
Problems with access and administrator rights
Sometimes users encounter a situation where the system refuses to view the password, citing a lack of rights. This is a standard measure. security macOS is designed to protect data from malware and accidental actions. However, this shouldn't be a barrier for the rightful owner.
Make sure you're logging in with an account that has administrator privileges. Guest accounts or restricted profiles don't have access to Keychain. If you're working on a shared computer, the password may be saved in another user's profile, and you'll need their presence to log in.
⚠️ Attention: Router settings interfaces and macOS versions are regularly updated. The menu item locations may differ from those described. If you can't find the setting you need, consult the official documentation from your equipment manufacturer.
In rare cases, resetting Keychain settings can help, but this will delete all saved passwords, which is undesirable. It's best to try to remember the password or use Time Machine backups if you have them. Restoring from a backup can restore lost data without losing any other information.
What to do if you forgot your Mac administrator password?
If you don't remember your account password, you can reset it using Recovery Mode. Boot up by holding Command + R, open Terminal from the utilities menu, and enter resetpassword. This will allow you to set a new password and access your data.
Frequently Asked Questions (FAQ)
Is it possible to find out the Wi-Fi password if the Mac is not currently connected to this network?
Yes, you can. macOS keeps a history of every network you've ever connected to. Find the network name (SSID) in the list of saved networks in Keychain or Terminal, and you'll be able to see the password even if you're not currently connected.
Where are Wi-Fi passwords physically stored on a MacBook?
All passwords are stored in an encrypted Keychain database file, which is in the system folder /Library/Keychains/Access to this file is protected by system permissions and encryption, so simply copying it and opening it on another computer without a password won't work.
Is it safe to use third-party password viewers?
Using unverified software carries risks. Third-party utilities may request full system privileges, which is potentially dangerous. Built-in macOS tools (Keychain Access and Terminal) are completely safe and don't require additional software, so we recommend using them.
What should I do if the password is not displayed even after entering the user password?
This may indicate a corrupted Keychain file. Try restarting your computer. If the problem persists, you can create a new Keychain, but this will require you to re-enter your passwords for all services. First, check that your macOS login password matches your Keychain password.
Restoring wireless network access on a MacBook is a task that can be accomplished using the operating system's built-in tools. Whether you use the Keychain graphical interface or prefer Terminal commands, your data is securely stored in the system. The key is to have physical access to the device and administrator privileges.
Change your passwords regularly to complex combinations and store them in a safe place to avoid similar situations in the future. Using password managers or keeping paper notebooks in a safe place will help you keep your digital access organized. Protect your data and control your home network connection.