How to find the password for a connected WiFi connection on a Mac

Situations where you need to remember a forgotten wireless network password arise quite often for Apple computer users. Perhaps you have friends over who urgently need to connect to the internet, or you've decided to set up a new router and want to use the same security key as before. Unlike mobile devices, where the password is often hidden behind asterisks, the operating system macOS stores this information in a secure storage facility, which can still be accessed with administrator rights.

It is important to understand that password recovery This is only possible if your computer has successfully connected to this network before. The system automatically saves access keys for easy reconnection, but hides them from prying eyes. To extract this data, we'll need to use Apple's built-in security tools, such as iCloud Keychain or the command line.

Don't worry about the complexity of the process: although the methods seem technical, they are built into the operating system itself and don't require any third-party software. The main thing is to follow the instructions carefully and have physical access to the device, as you won't be able to do this without entering your account password or using biometrics. Touch ID The system won't reveal sensitive data. Let's look at the main ways to retrieve this information.

Using iCloud Keychain to Find Your Password

The simplest and most visually understandable method for most users is to use the system's Keychain Access utility. This tool acts as a centralized repository for all passwords, certificates, and keys ever stored on your device. MacTo find the required key, you will need to open the application via Spotlight search and enter "Keychain Access" in the English version of the system.

After launching the program, a list of all saved entries will open. In the left panel, select the "Passwords" category to filter out unnecessary system certificates. Find the name of your wireless network (SSID) in the list. If the list is too long, use the search in the upper right corner of the window. Double-clicking the network name will open the properties window, where we're looking for the "Show Password" tab.

If you try to check the "Show password" box, the system will ask you to confirm your identity. You will need to enter the computer administrator password or use Touch ID, if your MacBook equipped with the appropriate sensor. This is a critical element. macOS security, which prevents data theft if a third party gains control of the computer without knowing the master password.

⚠️ Attention: If you see a message that the password cannot be shown, check the "Show password" box and ensure you entered the administrator password correctly. Also, make sure you're trying to view the password for your WiFi network, not another network type.

After successful authorization, the character combination you were looking for will appear in the field next to "Show password." You can copy it or simply rewrite it. This method works on all current versions of the operating system, including macOS Sonoma and older releases like Catalina or Mojave.

Finding a password using the Terminal command line

For users who prefer command line For users who don't have access to a graphical interface, there's a faster way using Terminal. This method allows you to retrieve the password with a single command, which is especially convenient if you need to quickly copy the result or transfer it to a text file. Open Terminal using Spotlight or by finding it in the Applications → Utilities folder.

In the window that opens, enter a special command that will prompt the system for a security key for the specified network. The command syntax is as follows:

security find-generic-password -wa"YourNetworkName"

Replace the text "Your_Network_Name" with the actual name of your WiFi router. If there are spaces in the network name, be sure to enclose it in quotation marks, as shown in the example. After pressing the key Enter The system will also ask for permission to access the security key. You'll need to click "Always allow" or enter your administrator password.

What to do if the command fails?

If Terminal returns an error, check the spelling of the network name. It must match down to the last character, including case. Also, make sure you're using double quotes if the network name contains spaces.

Unlike the graphical interface, the Terminal will immediately display the password in plain text, which can be easily copied. This method is often used by system administrators for remote support or automated settings. It demonstrates how deeply integrated the management tools are. UNIX-like the basis of macOS.

View passwords in Settings on macOS Ventura and later

In the latest versions of the operating system, starting with macOS Ventura and relevant SonomaApple has made it much easier to access your saved data by making the settings interface similar to the mobile one. iOSNow, users don't need to delve into deep system utilities. Open "System Preferences" via the Apple menu (the apple in the upper left corner) and go to the "Wi-Fi" section.

In the list of known networks, find the one whose password you want to find out. An information icon or three dots may appear next to the network name or under (Details). In some interface updates, simply hovering over or clicking the "i" icon next to an active or previously connected network is sufficient. If the network is active, the password field may be hidden by dots.

Click on the hidden password field (usually labeled "Password"). The system will ask you to confirm the action using Face ID (on new MacBooks) or entering the user password. After confirmation, the dots will turn into readable text, and you can copy it to the clipboard. This method is the most user-friendly and requires a minimum of action.

📊 What version of macOS are you using?
Mojave or older
Catalina / Big Sur
Monterey
Ventura / Sonoma / Sequoia

It's worth noting that the settings interface may differ slightly depending on the specific update version. Apple regularly makes changes to the design of system preferences, so the layout of elements may vary. However, the logic behind the settings—hiding the password until authentication—remains the same across all versions.

Comparison table of recovery methods

To help you choose the right method, we've prepared a comparison table. It will help you determine which method will be most effective in your specific situation, taking into account your operating system version and your level of technical expertise.

Method Complexity macOS versions Necessary rights
Bunch of keys Average All versions Administrator
Terminal High All versions Administrator
Settings (Ventura+) Low Ventura and newer Biometrics/Password
Router (web interface) Average Does not depend on OS Access to the router

As can be seen from the table, for older systems the classic remains the optimal choice. Bunch of keysFor modern computers with updated interfaces, the easiest way is to use the default settings. The Terminal method is universal, but requires careful command entry.

What to do if your Mac won't show your password

Sometimes users encounter a situation where none of the above methods work. This can happen for several reasons. The first and most common is that the computer has never successfully connected to this network. The system does not store passwords for networks she didn't connect to, because she simply had nowhere to get them from.

The second reason may be a damaged Keychain file. If the system file responsible for storing secrets is damaged, access to data may be restricted. In this case, restart your computer or launch Keychain and check its status using the File → Keychain Diagnostics menu.

☑️ Check before recovery

Completed: 0 / 4

It's also worth checking whether your Keychain is synced via iCloud. If you previously enabled password syncing, the key you're looking for may be saved on another Apple device, such as iPhone or iPad, and you can view it there. On iOS 16 and later, as well as iPadOS 16+, WiFi passwords are located in a separate menu in Settings.

⚠️ Attention: If you're trying to obtain a password for a corporate network or guest access, the system may block key viewing due to organizational security policy. In such cases, please contact your system administrator.

Alternative method: enter the router settings

If software methods on the Mac itself don't work, there's always the hardware option: checking the router's settings. To do this, your computer must be connected to the router (via WiFi or cable). Open any browser and enter the router's IP address in the address bar. This is most often 192.168.0.1 or 192.168.1.1.

You'll need to log into your router's control panel. If you've never changed the factory settings, the login and password are often found on a sticker on the bottom of the device. These are usually combinations like admin/adminOnce in the menu, find the "Wireless" or "WLAN" section. The current password will be listed in the "Wireless Password" or "Security Key" field.

This method is great because it doesn't depend on your computer's operating system. You can use any browser on any device connected to the network. However, if someone else changed your password and it's not saved in the browser, you'll still have to find a way to log in to the router.

Security measures when working with passwords

Once you have access to your password, it is important to remember the rules cyber hygieneNever share access keys over open communication channels, such as unencrypted email or instant messaging apps, without verifying the identity of the recipient. If you've shown your password to someone, it's a good idea to change it in your router settings, especially if it was a temporary guest network.

It's recommended to use complex passwords containing mixed-case letters, numbers, and special characters. These combinations are more difficult to brute-force. For managing multiple complex passwords, it's best to use specialized password managers that integrate with Apple Keychain.

Regularly update your router firmware and Mac operating system. Software vulnerabilities can allow attackers to access stored networks. Apple regularly patches security holes, so ignoring updates puts your data at risk.

Is it possible to find out a WiFi password if a Mac has never connected to that network?

No, this is impossible. A Mac can't access passwords for networks it hasn't connected to. The only way is to obtain the password from the network owner or view it on a device already connected to that Wi-Fi network.

Where are WiFi passwords physically stored on Mac?

Passwords are stored in an encrypted Keychain database file, typically located at ~/Library/Keychains/login.keychain-db. This file cannot be read without the administrator password.

What should I do if I forgot my Mac administrator password?

Without an administrator password, you won't be able to view saved WiFi passwords. You'll need to reset your Apple ID account password first or use recovery mode to reset the user password.

Is it safe to use third-party password viewers?

Using unverified third-party programs carries risks. They may contain malicious code. It's better to use built-in macOS tools, such as Keychain Access or Terminal, as they are part of Apple's secure ecosystem.