It's common to need to connect a new device to a wireless network or share access with guests, but the password is hopelessly forgotten. For ecosystem users Apple Solving this problem often seems difficult due to the closed nature of its security system, but macOS stores all access codes ever entered in a special, secure vault. This vault, called Keychain, is the central control for managing your computer's credentials.
Recovering lost data is only possible if your Mac previously successfully connected to the desired network and saved the credentials. If you're trying to find the code for a network the computer has never connected to, software methods won't work, and you'll have to look for a physical sticker on the router or contact your ISP. In this article, we'll cover all the current methods for retrieving saved passwords, including new features in macOS Sonoma and classic methods for older versions of the operating system.
It's worth noting that macOS data security is built at a high level, so you'll still need authorization to view saved information. You'll need to enter your user account password or use biometric authentication via Touch ID, if your laptop is equipped with the appropriate sensor. This is a standard procedure to prevent unauthorized access to your personal data in the event of theft or loss of your device.
Using iCloud Keychain in macOS Sonoma and later
With the release of the operating system macOS Sonoma company Apple has significantly simplified users' lives by adding the ability to view Wi-Fi passwords directly in System Preferences. Previously, this process required accessing hidden utilities, but now it's intuitive and accessible in just a few clicks. This method is the fastest and most secure for owners of modern Mac computers updated to the latest software version.
First, you need to open your device's system settings. In the left sidebar, find and select Wi-FiThis displays a list of known networks and their current connection status. If you're not in the main settings window, you can search the settings by entering "Wi-Fi" in the search bar in the upper-right corner.
In the list of known networks that opens, find the one you need to find the password for. Next to the network name or in the details section by clicking the information icon (i) A password field will be displayed. It's initially hidden by asterisks or dots. Click these symbols or the "Show Password" button, and the system will ask you to confirm your identity.
⚠️ Attention: To display your password in macOS Sonoma, your screen must be unlocked and you must be logged in. If Face ID or Touch ID doesn't work the first time, the system will prompt you to enter your Mac account password manually.
After successful authentication, the hidden characters will be replaced with readable text. You can copy it by right-clicking and selecting the appropriate option, or simply memorize it. This method works exclusively thanks to synchronization via iCloud Keychain, so make sure this feature is enabled in your Apple ID settings.
Finding a password using Keychain Access on older versions of macOS
If your computer is running an older version of the operating system, such as Catalina, Mojave or even earlier, the system settings interface will not contain a direct button for viewing passwords. In such cases, the built-in system utility "Keychain Access" (Keychain Access). This is a powerful tool for managing all stored certificates, keys, and passwords in the system.
There are several ways to launch the utility. The easiest way is to use Spotlight search by pressing the key combination Command + Space and entering the program name "Keychain Access." Alternatively, you can go to the folder Programs, then open the folder Utilities and launch the desired file from there. Once launched, a window will open with a list of all saved items.
In the left column, make sure the "Passwords" category is selected, and in the "Keychain" list, select "Login" or "System." In the right part of the window, enter the name of your Wi-Fi network (SSID) in the search bar. The system will filter the list and display only the relevant entry. Double-click the network name to open the properties window.
In the dialog box that opens, find the checkbox labeled "Show password." Checking this box will open a system login window where you'll be prompted to enter your computer administrator password. Once you've entered the correct password, the access code will appear in plain text in the text field next to the checkbox.
☑️ Checking Keychain Access
Router settings as an alternative recovery method
In situations where access to your Mac is impossible or the operating system won't load, the only option is to access the router's settings. If you have physical access to the router and can connect your computer via Ethernet or another device already on the network, you can change the password or view the current one in the device's web interface.
To access the control panel, you need to know the gateway's IP address. On a Mac, you can find it by holding down the [key] Option and clicking on the Wi-Fi icon in the menu bar, or going to System Preferences → Network → Wi-Fi → Advanced → TCP/IPFind the line “Router” - this is the address, usually looking like this: 192.168.1.1 or 192.168.0.1Enter this address into the address bar of your browser.
After entering the address, you'll need to log in. If you've never changed the default settings, your login and password are often listed on a sticker on the bottom of the router (usually admin/admin). Once you've logged in, find the section related to your wireless network. It may be called Wireless, Wi-Fi, Wireless mode or WLAN.
Inside the section, look for the subsection “Security” (Security) or "Wireless Network Settings." There will be a field labeled "Wireless Password," "WPA Pre-Shared Key," or "Wireless Password." Some router models display the password in plain text, while others display it as asterisks. However, there's often a "Show" button or an eye next to it.
⚠️ Attention: Changing settings in the router's web interface (for example, changing the password) will disconnect all connected devices. You'll have to reconnect smartphones, tablets, and laptops with the new password.
Comparing Mac Password Recovery Methods
The choice of method for recovering a forgotten password directly depends on the version of the operating system installed on your MacBook or iMac, as well as access to administrative rights. Each method has its own advantages and limitations, which should be considered before beginning the procedure.
Below is a table comparing the main characteristics of the methods considered, which will help you quickly determine the appropriate course of action in your particular situation.
| Method | Required macOS version | Administrator access required | Complexity |
|---|---|---|---|
| Wi-Fi settings | macOS Sonoma and later | Yes (FaceID/TouchID) | Low |
| Bunch of keys | Any version of macOS | Yes (User Password) | Average |
| Router web interface | Does not depend on macOS | Yes (Router Password) | High |
| Terminal (commands) | Any version of macOS | Yes (User Password) | High |
As can be seen from the table, for most users of the latest MacBook Air And MacBook Pro The best option is to use the system's built-in settings. However, for owners of older equipment or those who prefer deeper control over the system, classic methods using utilities are more suitable.
Using the Command Prompt for Advanced Users
For users who prefer to work with TerminalIt's possible to obtain the password via the command line. This method may seem complicated for beginners, but it provides direct access to the key database without having to navigate through the utility's graphical interface. This is especially useful if the system's graphical interface is unstable.
Open the Terminal application via Spotlight or by finding it in the Utilities folder. To extract the password, use the command security, which is part of the macOS system security tools. The command syntax requires the exact network name.
security find-generic-password -wa"Your_Network_Name"
Replace the text "Your_Network_Name" with the exact name (SSID) of your Wi-Fi network, enclosed in quotation marks. After entering the command and pressing the key Enter The system will request permission to access the key. After confirmation, the password will appear in clear text in the terminal window.
What to do if the command fails?
If Terminal returns an error, check the spelling of the network name. It must match character for character, including capitalization. Also, make sure the network has been previously saved on this Mac.
Security issues and protection of stored data
Storing passwords in clear or partially clear text on your device carries certain risks. Understanding the security mechanisms macOS will help you better secure your data. Primary protection is based on disk encryption. FileVault and protecting your keychain with a login password.
If an attacker gains physical access to an unlocked computer, they can use the methods described above to steal passwords. This is why it's critically important not to use weak passwords when logging into a Mac user account. A weak account password renders all keychain protection useless.
It's recommended to regularly check your list of saved networks and delete any you no longer use or that raise suspicions. This can be done in the same Keychain Access utility by selecting the unwanted entry and pressing the [Delete] key. Delete.
⚠️ Attention: Never share your Mac with anyone else with the screen unlocked. Even a short work session allows you to save your current Wi-Fi password to the keychain of a new device or copy it.
Frequently Asked Questions (FAQ)
Is it possible to view a Wi-Fi password even if my Mac isn't currently connected to the network?
Yes, it's possible. macOS keeps a history of every network you've ever connected to and entered the password for. Even if a network is out of range or you disconnect from it, its entry remains in Keychain, and the password can be retrieved using the methods described above.
What if I forgot my Mac account password and can't open Keychain?
In this case, standard methods won't work because they require authorization. You'll have to reset the user account password via your Apple ID (if linked) or use Recovery Mode. However, this is a complex procedure that requires caution.
Where is the physical password on the router if I haven't changed the factory settings?
The factory password (if it wasn't changed during initial setup) is usually printed on a sticker on the bottom or back of the router. Look for the "WPA Key," "Wireless Password," or "PIN" fields. This information may also be included in the instructions included with the device.
Is it safe to use third-party password recovery programs?
Using third-party software to access system password storage carries risks. Such programs often require full access (root), which is potentially dangerous. Built-in macOS tools (Keychain, Preferences) are the safest and most reliable option.