It's quite common to need to connect a new device to your home wireless network or share access with guests, but you've forgotten the password. Apple device owners may encounter difficulties, as macOS doesn't prominently display saved access keys in the standard interface, unlike mobile operating systems. However, the operating system securely stores this data in a protected vault, and with administrator rights, it can be easily retrieved.
There are several methods available to recover a forgotten access key, ranging from using a graphical interface to using the command line. iCloud Keychain This is the primary storage location for confidential information, where macOS automatically stores Wi-Fi network passwords immediately after the first successful connection. This ensures data synchronization across all devices linked to the same Apple ID.
Regardless of the version of the operating system, be it older macOS Catalina or the newest macOS SonomaThe principles of working with keys remain similar, although the layout of some interface elements may vary slightly. It's important to understand that to perform most actions, you'll need to enter your user account password or use biometric authentication via Touch ID, if it is supported by your device.
Using Keychain on older versions of macOS
For operating systems versions up to macOS Ventura Inclusive, the primary password management tool is the Keychain Access utility. This system component serves as a centralized repository for passwords, certificates, and encryption keys. To find the key you need, launch the utility via Spotlight search or by locating it in the Applications → Utilities folder.
After opening the app, select the "Passwords" or "System" category from the list on the left. A long list of all saved network names will appear in the center of the window. Find your network in the list. Wi-Fi, double-click it or right-click and select "Show Password." The system will ask you to confirm your identity.
In the dialog box that opens, enter the password for your Mac administrator account. After successful authentication, the desired character combination will appear in the "Show Password" field. This method is the most versatile for users who prefer a visual interface and don't want to work with the command line.
- 🔑 Open Keychain Access via Spotlight or Finder.
- 🔍 Find your wireless network name in the "Passwords" list.
- 👁️ Click "Show Password" and enter the administrator credentials.
- 📋 Copy the displayed line for future use.
Finding a password in System Preferences on macOS Ventura and later
With the exit macOS Ventura Apple has given System Preferences a major overhaul, making them more user-friendly. iOSIn new versions of the operating system, Wi-Fi password management has become more intuitive and accessible directly from the settings menu, without the need to launch separate utilities. This has significantly simplified the process for regular users.
To view your saved key, go to the Apple () menu and select System Preferences. In the left sidebar, find the section Wi-FiIn the right part of the window, scroll down the list of known networks and click "Advanced" or "Manage known networks," depending on the specific minor version of the OS.
In the list that opens, select the desired network. Next to the network name or in the connection details, you'll see a hidden password field. Click the eye icon or the "Copy" button to reveal the characters. The system will ask for confirmation again. Touch ID or a user password, which guarantees data security even with physical access to an unlocked computer.
⚠️ Note: In some beta versions or specific corporate network configurations, Apple may hide the ability to view the password if the network was configured via a configuration profile (MDM). In this case, standard methods will not be able to obtain the key.
Using Terminal to retrieve access keys
For advanced users who prefer speed and precision, using the command line is an excellent solution. Terminal Allows you to send a direct request to the system keychain and receive a response as a text string. This method is especially useful if the graphical interface is not working correctly or if you need to quickly access data without unnecessary clicks.
Open the Terminal app (found in Applications → Utilities or via Spotlight search). You'll need to enter a command that accesses the utility. securityThe command syntax requires the network name (SSID) to be specified in quotation marks. After entering the command, the system will ask for permission to access the key.
security find-generic-password -wa "YourNetworkName"
After pressing Enter, a system window will appear asking if you want to allow the Terminal application to access the password in the "login" keychain. Click "Always allow" or enter the administrator password. Terminal will respond with a plain text password, without unnecessary characters, which you can copy.
- 💻 Launch Terminal via Spotlight search.
- ⌨️ Enter the command
security find-generic-password -wa "SSID". - 🛡️ Confirm the action in the system security window.
- 📥 Copy the output from the output line.
Syncing passwords via iCloud Keychain
One of the strengths of the Apple ecosystem is its deep integration of services. If you enable iCloud Keychain on your Mac, all passwords for Wi-Fi networks you've connected to from your iPhone or iPad are automatically available on your computer. This eliminates the need to re-enter complex passwords on each device.
To ensure syncing is enabled, go to System Preferences, click your name (Apple ID) at the top of the list, and select iCloud. Make sure the toggle next to Keychain is enabled. If it was disabled, enable it and wait for the data to sync with the server.
Once syncing is enabled, passwords saved on other devices will appear in your Mac's local keychain. You can find them using the methods described above (via Keychain Access or Wi-Fi settings). This is especially convenient if you've forgotten your password but previously connected your smartphone to the same network.
⚠️ Important: For syncing to work, two-factor authentication for your Apple ID must be enabled on all devices. Without this critical security element, encryption keys cannot be transferred between devices.
The password for a guest Wi-Fi network, if it is set up through a provider's router, may not sync if the device connected to it temporarily and was not saved to a permanent list of preferred networks.
Password Search Method Comparison Table
The method you choose to restore access depends on your macOS version and your personal system management preferences. Below is a comparison of the main methods to help you choose the most appropriate one for your situation.
| Method | macOS version | Complexity | Necessary rights |
|---|---|---|---|
| Keychain (Utility) | Before Ventura | Average | Administrator |
| System Preferences | Ventura and newer | Low | User / Touch ID |
| Terminal (Command Prompt) | All versions | High | Administrator |
| Router (Web interface) | Does not depend on OS | Average | Access to the router |
Alternative method: enter the router settings
If none of the software methods on the computer itself help (for example, the password isn't saved in the keychain or the system is unstable), there's always the hardware option. You can view the password in the router's settings. To do this, the computer must be connected to the router, even if it doesn't have internet access.
Open your browser and enter the gateway IP address in the address bar. Most often, this is 192.168.1.1 or 192.168.0.1You can find the exact address in your Mac's System Preferences under "Network" → "Advanced" → "TCP/IP" tab, "Router" line. Enter the router administrator login and password (often found on a sticker on the bottom of the device).
In the router interface, find the section related to the wireless network (Wireless, Wi-Fi Settings). There, in the field WPA Pre-Shared Key or "Password" will display the current access key. You can not only view it but also change it to a more complex one if you suspect your network has been compromised.
What should I do if I've forgotten my router password?
If you changed your router's admin password and forgot it, your only option is to reset the device to factory settings. To do this, locate the small reset hole on the device's casing and press the button inside with a paperclip for 10-15 seconds. The router will reboot with factory settings, but you'll have to reconfigure the internet settings.
Security measures and access control
Once you have access to passwords, it's important to consider the security of your network. Regularly changing access keys and using complex character combinations are basic digital security practices. Avoid using simple sequences or birth dates, as they are easily brute-forced.
macOS allows you to not only view but also delete old, unnecessary networks from the list of saved networks. In Keychain Access or System Preferences, you can delete a network profile you no longer plan to connect to. This reduces the risk of automatically connecting to unsafe access points with the same name (SSID), which could be created by malicious users.
Remember that storing passwords in iCloud Keychain is convenient, but it requires reliable protection of your Apple ID. Use strong passwords for your account and be sure to enable two-factor authentication to prevent unauthorized access to your data even if your primary password is leaked.
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, if you've connected to this network before and your Mac has it saved. You can find it in Keychain Access or Terminal, even if you're currently out of range of the router or connected to a different network.
Why does macOS require an administrator password to view a Wi-Fi key?
This is a security measure for the operating system. Since the keychain stores not only Wi-Fi passwords but also access to banking websites, email accounts, and other critical services, the system requires permission to display any sensitive information.
Where are Wi-Fi passwords stored at the physical level?
Data is stored encrypted in keychain files in the user's system folder. Without the decryption key, which is your account password, these files are unreadable characters.
Does the password sync if I change my iPhone but keep my old Mac?
Yes, as long as both devices use the same Apple ID and have iCloud Keychain enabled. When you change phones and restore from a backup or initial setup, your passwords will be retrieved from the cloud, and your Mac will also update its data if you have an internet connection.