The situation when you need to connect a new device to the network, but the password is lost or forgotten, is familiar to many users of the ecosystem Apple. Fortunately, the operating system macOS has a built-in mechanism for securely storing all access keys ever entered. This data is stored in a special secure vault, which can be accessed even without administrator rights in some cases. If your computer is already connected to the network or has connected to one before, recovering a forgotten password combination is easy.
There are several proven methods for extracting this information, from using the system's graphical interface to the command line. The choice of method depends on your operating system version and personal preferences. In this article, we'll cover each available option in detail so you can choose the most convenient one. We'll also address security issues and explain how the system protects your data from unauthorized access.
It's important to understand that to perform most of the actions described, you will need to verify your rights. The system will ask you to enter your account password or use biometric authentication via Touch IDThis is a standard security procedure that ensures that only the device's owner can access stored network keys. Without this confirmation, viewing hidden data is impossible by any means.
Using iCloud Keychain to Recover Access
The primary repository for all passwords in the ecosystem Apple The "Keychain" utility is the central storage location for your account. This is where logins and passwords for websites, apps, and, crucially for us, Wi-Fi networks are stored in encrypted form. To find the information you need, open the utility via Spotlight search or by finding it in the "Applications" → "Utilities" folder. Once launched, a list of all saved entries will appear.
In the left part of the window, select the "Passwords" or "All Items" category to filter out unnecessary entries. In the list of names (the "Name" column), find the name of your wireless network. It should match SSID router. If there are multiple networks, use the search in the upper-right corner of the window. Double-clicking on the entry will open the properties window, where we're looking for the "Show Password" tab.
After clicking the "Show Password" checkbox, the system will ask you to verify your identity. You'll need to enter your Mac account password or place your finger on the scanner. Once verification is successful, the required character combination will appear in the text field. You can copy it or simply remember it for entering on another device. This method works on all current versions of macOS, including Ventura, Sonoma And Sequoia.
⚠️ Please note: If you are using a corporate computer or a device owned by your organization, access to Keychain may be restricted by your system administrator. In this case, standard recovery methods may not work.
It's worth noting that Keychain syncs data between your devices via iCloud. This means that if you've ever entered a password on an iPhone or iPad and enabled syncing, the entry will also appear on your Mac. However, for the password to appear on your computer, the Mac itself must be signed in to iCloud using the same Apple ID.
Finding a password through system settings in newer versions of macOS
Starting with macOS Ventura, the company Apple significantly redesigned the system settings interface, making it more similar to the menu in iOSNew versions of the operating system now offer a more convenient way to manage saved networks. You no longer need to delve into deep system utilities to view the access key. All necessary functions are now located in the main settings menu, simplifying the process for the average user.
To get started, open the Apple menu in the upper left corner of the screen and select "System Preferences." In the sidebar, find the "Wi-Fi" section. If you're currently connected to a network, its name will be displayed at the top. However, we need to see a list of all known networks. Scroll down to the "Advanced" or "Known Networks" button, which displays a complete list of all access points your computer has ever connected to.
Find the desired network in the list and tap the three dots or the "More" icon next to the network name. In the details window that opens, you'll see the "Password" field. It's initially hidden behind symbols, but next to it will be a "Copy" button or an eye icon. Tapping this button will again require confirmation via Touch ID or the user's passcode. After successful authentication, the password will be copied to the clipboard or displayed in plain text.
- 🔑 Biometrics: Using Touch ID significantly speeds up the identity verification process compared to entering a text password.
- 📱 Synchronization: Changes you make to Wi-Fi settings on your Mac are instantly reflected on your other Apple devices via iCloud.
- 👁️ Visualization: The new interface allows you to see the connection status and signal strength for each saved network.
This method is the preferred choice for users who have updated to the latest versions of macOS. It minimizes the risk of accidentally changing system settings, as the interface is simplified and protected from inadvertent actions. Furthermore, you can also remove a network from the list of known networks if it is no longer relevant.
Using the Terminal for Advanced Users
For those who prefer working with the command line or cannot find the desired network in the graphical interface, there is a powerful tool - TerminalThis method allows you to access the keys through the system utility. securityIt's especially useful if the graphical interface isn't working correctly or if you're used to using hotkeys and scripts to control the system.
Open the Terminal app (found in Applications → Utilities or via Spotlight search). To retrieve the password for the network you're currently connected to, you can use the following command. It will automatically detect the name of the active network and request the password from Keychain:
security find-generic-password -wa"$(networksetup -getairportnetwork en0 | grep -v'^Current' | sed's/^[[:space:]]*//')" 2>/dev/null
If you want to find out the password for a specific network whose name you know, the command will look different. You need to put the network name (SSID) in quotation marks. For example, if the network is called HomeWiFi, the command will be like this:
security find-generic-password -wa"HomeWiFi"
After entering the command, press EnterThe system will ask you to confirm the action in the system window that appears (allow access to Keychain). After confirmation, the password will be displayed directly in the Terminal window in clear text. This method works on all versions of macOS, including the oldest, and is a universal solution.
⚠️ Warning: When working in Terminal, be careful with command syntax. A misspelling of the network name (for example, an extra space or incorrect letter case) will result in a runtime error but will not harm the system.
Using the command line provides more granular control. For example, you can use a script to dump all passwords at once, although this requires more complex access rights manipulation. For a one-time password extraction for a single network, the command described above is sufficient. This is a quick and effective method for technically savvy users.
View passwords on iPhone or iPad
Thanks to the ecosystem AppleWi-Fi network passwords are synced across all your devices using the same Apple ID. If you don't have a Mac, but have an up-to-date iPhone or iPad, iOS or iPadOS (starting with iOS 16 and iPadOS 16.1), you can view your password there. This is often even more convenient than searching for settings on your computer.
The process is very simple: pick up your smartphone, unlock it, and open "Settings." Go to the "Wi-Fi" section. In the list of networks, find the one you need to find the password for and tap the blue information icon (the letter "i" in a circle) to the right of the name. In the menu that opens, find the "Password" line. By default, the characters are hidden behind dots.
Tap the password field. Your device will prompt you for biometric authentication (Face ID or Touch ID) or your unlock passcode. Once successfully confirmed, the password will be revealed and can be copied. Thanks to the Universal Clipboard (Handoff) feature, text copied on your iPhone will instantly be available for pasting on your Mac if they are nearby and use the same Apple ID.
| Device | Minimum OS version | Authorization method | Copyability |
|---|---|---|---|
| Mac (macOS) | Any | Account password / Touch ID | Yes |
| iPhone / iPad | iOS 16 / iPadOS 16.1 | Face ID/Touch ID/Passcode | Yes |
| iPod Touch | iOS 16 | Passcode/Touch ID | Yes |
| Apple Watch | watchOS 9+ | No (auto-connection only) | No |
You can check this in your Apple ID settings on any of your devices. If syncing was disabled when you entered your password on one device, it may not be present on the other. In this case, you'll need to find the password on the device where it was originally entered.
☑️ Checking synchronization
What to do if the password is not displayed
Sometimes users encounter a situation where none of these methods work. The Keychain window may be missing the desired entry, or the system repeatedly denies access. Most often, this is because the computer has never automatically connected to the network with the password saved. If you manually entered the password each time and didn't check "Save in Keychain," the system simply has no place to store it.
Another possible cause is a corrupted key database. This is rare, but it can occur after system update failures or sudden power outages. In this case, you may need to create a new Keychain, which will result in the loss of all saved passwords. It is always recommended to back up your data using Time Machine before doing this.
It's also worth checking whether the network is corporate or educational. Such networks often use security protocols (such as 802.1x) where the password is part of a complex certificate or configuration profile. In this case, there may be no "password" in the traditional sense, and access is achieved through a digital certificate installed by the administrator.
- 🔍 Checking records: Please check your Keychain list carefully, the network may be listed under a different name or IP address.
- 🔄 Reboot: A simple Mac reboot can resolve temporary glitches that prevent data from displaying.
- 👤 Access rights: Make sure you are logged in as an administrator and not a guest.
If you've changed your router password, but your Mac device is still trying to connect with the old key and getting an error, you need to "forget" the network. To do this, remove it from the list of known networks in your Wi-Fi settings, then reconnect using the current password. The system will ask if you want to save the new password in Keychain—be sure to accept.
Why does Keychain require a password every time I sign in?
This is a fundamental security mechanism of macOS. Even if an attacker gains physical access to the hard drive, they won't be able to extract passwords without knowing the user's master password, as the key database is encrypted separately.
Security measures and access control
Storing passwords in plaintext (even in an encrypted database) always carries potential risks. If someone gains access to your unlocked computer, they can easily discover passwords for all your networks. Therefore, it's crucial to use a strong password when logging into your macOS account and never leave your computer unlocked unattended in public places.
It's recommended to regularly check the list of saved networks in Keychain and delete those you no longer use. This reduces your attack surface. It's also a good practice to periodically change the password for your primary Wi-Fi network, especially if you suspect it may have been compromised.
Use a guest network for visitors. Most modern routers allow you to create a separate network for guests. Its password can be changed frequently, and it's isolated from your main home network, where your personal files, printers, and smart home devices are located. On a Mac, you can set up automatic connections to prioritized networks so your phone always chooses a secure connection.
⚠️ Note: The settings interface and menu layout may vary slightly depending on your specific macOS version. If you don't find the option, search for "Wi-Fi" or "Password" in the Settings window.
Remember that the security of your data depends primarily on you. Using strong passwords, two-factor authentication, and regularly updating your operating system to the latest version are basic rules that will help protect your digital life. macOS provides powerful access management tools, but you need to use them wisely.
Frequently Asked Questions (FAQ)
Is it possible to find out the Wi-Fi password if the Mac is not connected to it right now?
Yes, you can. If your Mac has ever connected to this network and saved the password in Keychain, you'll be able to see it. A current active connection isn't required; only a saved entry is important.
What should I do if I forgot my Mac account password?
Without your account password (or your Apple ID password if two-factor authentication is enabled), it's impossible to view saved passwords in Keychain. This is a level of data protection. You'll first need to restore access to your account via your Apple ID or reset your password, if possible.
Where is the password file stored on disk?
Physically, the Keychain Access database is located at /Library/Keychains/ in the system folder or in the user folder. However, the files have the extension .keychain-db and securely encrypted. Simply copying these files to another computer will prevent access to the passwords without the master password.
Why is the password visible on iPhone but not on Mac?
This may be related to your operating system version. The ability to view Wi-Fi passwords explicitly in Settings was introduced in iOS 16 and macOS Ventura. On older versions of macOS, you need to use Keychain Access, not the Wi-Fi settings menu.
Is it possible to export all Wi-Fi passwords at once?
macOS natively doesn't allow bulk export of passwords in plain text for security reasons. Each password must be reviewed individually. While third-party utilities exist, their use carries the risk of data leakage, so rely solely on Apple's built-in tools.