How to Find a Wi-Fi Password on a Mac: All Methods for macOS

Forgot your home Wi-Fi password and there's no sticker with the password on your router? Or need to connect a new device but can't be bothered to find the piece of paper with the code? MacBook, iMac or Mac mini There are several ways to retrieve a saved network password - without resetting the router and connection loss. All methods work on the latest versions. macOS Sonoma, Ventura and Monterey, as well as on older systems like Big Sur or Catalina.

In this article - 5 proven methods, from the simplest (through standard settings) to advanced (using Terminal). We'll also look at why the password sometimes isn't displayed, and what to do if you're not the administrator on this MacAnd at the end are answers to frequently asked questions, including safety and alternative options.

⚠️ Attention: Password extraction is only possible for networks to which you are connected. Mac has already connected before. If the device has never been connected to this network, none of these methods will work—you'll need access to the router or help from your ISP.

Before you begin, make sure you are logged in to an account with permissions. administratorRegular users will not be able to view passwords in Keychain or through Terminal.

Method 1: Via Keychain Access (the most secure method)

"Bunch of keys" (Keychain Access) is a built-in password storage in macOS, where all authorization data is stored, including Wi-Fi network keys. This method works on all versions of macOS without exception and does not require installation of additional programs.

To find your password:

  1. Open Programs → Utilities → Keychain (or use the search Spotlightby clicking Cmd + Space and entering "Keychain Access").
  2. Select a category in the left column System (or Local elements, if the password is saved in your personal link).
  3. In the search bar, enter the name of your Wi-Fi network.
  4. Double-click on the found entry and check the box. Show password and enter your account login/password Mac.

⚠️ Attention: If the password field remains blank or returns the error "Unable to display password," your account does not have sufficient rights. Try logging in as an administrator or use Terminal (method 3).

This is what the hidden password window looks like (before entering the administrator data): Screenshot of the Keychain Access window with the administrator password entry field

☑️ What to check if your password isn't displayed

Completed: 0 / 4

Method 2: Via network settings (fast, but doesn't always work)

In some versions macOS (For example, Monterey and newer) the password for the current network can be viewed directly in the Wi-Fi settings - without launching Keychain AccessThis method is simpler, but it doesn't work on all devices.

Instructions:

  1. Click on the Wi-Fi icon in the upper right corner of the screen (next to the clock).
  2. Select Network settings... (or Open network settings in new versions).
  3. Click Additionally... in the lower right corner.
  4. Go to the tab Wi-Fi and find your network in the list Well-known networks.
  5. Click on the network and check the box. Show password — the system will request administrator data.

🔹 Limitation: This method shows the password only for current active networkIf you need a key for another saved network, use A bunch of keys or Terminal.

This is what the password window looks like (after entering the administrator data): A screenshot of the Wi-Fi settings with the password field open

📊 Which method do you find more convenient?
Via Keychain Access
Through network settings
Via the Terminal
I don't know, I haven't tried it yet.

Method 3: Via Terminal (for advanced users)

If the first two methods did not work, you can extract the password using command lineThis method is universal and works even on older versions. macOS, but requires precise command entry.

Open Terminal (Programs → Utilities → Terminal) and perform in order:

security find-generic-password -wa"YOUR_NETWORK_NAME"

Replace YOUR_NETWORK_NAME to the actual Wi-Fi name (for example, security find-generic-password -wa"TP-Link_1234"). The system will ask for an administrator password—enter it, and the network key will be displayed in the terminal.

⚠️ Attention: If the network name contains spaces or special characters, enclose it in quotation marks:

security find-generic-password -wa"My Wi-Fi Network"

🔹 Alternative team (if the first one didn't work):

sudo defaults read /Library/Preferences/SystemConfiguration/com.apple.airport.preferences | grep "NETWORK_NAME" -A 7
What to do if the Terminal displays the error "Could not find password"

This error means the password for this network is not saved in the system. Possible causes:

- The Mac has never connected to this network.

- The password was manually removed from Keychain.

- The network is saved, but without a password (for example, if the connection was via WPS).

In this case, try other methods or reset the password on the router.

Method 4: Via configuration files (for experienced users)

IN macOS Wi-Fi passwords are stored in encrypted configuration files. They can be extracted manually, but this method not recommended for beginners - an error in the commands may lead to a failure of network settings.

If you are confident in your actions, follow these steps Terminal:

sudo cat /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist | grep -A 10"NETWORK_NAME"

Find the line in the output password — after it will be the encrypted key. To decrypt it, use the command:

security find-generic-password -w"NETWORK_NAME"

🔹 Warning: Editing files in /Library/Preferences/ may disrupt network operation. Do not modify these files manually. — just take a look!

Method 5: Via a router (if you don't have access to a Mac)

If none of the methods worked (for example, you are not an administrator on this Mac), you can find out the password directly from routerThis will require physical access to the device or login information for its web interface.

General instructions:

  1. Connect to the router via cable or Wi-Fi (if the network does not have a password).
  2. Open your browser and enter your router's IP address (usually 192.168.0.1, 192.168.1.1 or 192.168.8.1).
  3. Enter your login and password (by default it is often admin/admin or indicated on the router sticker).
  4. Go to the section Wi-Fi (or Wireless network) and find the field Password (or Wireless Key).

⚠️ Attention: If you haven't changed your router login details, your ISP may have reset them. In this case, contact technical support or follow these steps: reset (button Reset on the back panel), but this will disconnect all users from the network.

Here is an example of the router interface TP-Link with password field: A screenshot of the router's web interface showing Wi-Fi settings.

Table: Comparison of all methods

Way Complexity Admin rights required Works for all networks Suitable for macOS
Bunch of keys Yes Yes All versions
Network settings Yes For current only Monterey and newer
Terminal ⭐⭐ Yes Yes All versions
Configuration files ⭐⭐⭐ Yes Yes All versions
Via a router ⭐⭐ No Yes Any OS

Common problems and solutions

Sometimes users encounter errors when attempting to retrieve a password. Here are the most common cases and how to fix them:

  • 🔄 Password not showing in Keychain:
    • Make sure you are looking for the correct network name (SSID is case sensitive!).
    • Try the category System instead of Local elements.
    • If the network was connected via WPS, the password might not have been saved.
  • 🚫 The terminal gives an error Could not find password:
    • Please check the accuracy of the network name (including spaces and symbols).
    • If the network was connected in guest mode, the password is not saved.
  • 🔒 No administrator rights:
    • Ask the Mac owner to grant you temporary permissions.
    • Use the method with a router (method 5).

⚠️ Attention: For corporate or educational purposes Mac Access to Wi-Fi passwords may be blocked by security policies. In this case, please contact your IT department.

FAQ: Answers to frequently asked questions

Is it possible to find out the password for a Wi-Fi network that a Mac has never connected to?

No. All the listed methods only work for networks to which the device has already connected before. If Mac I have never logged into this network, the password can only be retrieved through the router or from the network owner.

Is it safe to use Terminal to retrieve password?

Yes, if you enter the commands exactly as instructed. The commands themselves security And defaults These are designed to work with system data and will not cause any harm. However, do not edit configuration files manually, as this may disrupt network operation.

Why isn't my Wi-Fi network listed in Keychain?

Possible reasons:

  • The network was connected via WPS (password is not saved).
  • You connected in guest mode (for example, in a cafe or hotel).
  • The entry was deleted manually.
  • The network name (SSID) has changed, but the old entry remains under a different name.

Try searching by partial network name or check the category System.

Is it possible to find out the password from an iPhone if it is connected to the same Wi-Fi?

On iPhone or iPad There is no built-in way to view the Wi-Fi password (unlike Android). However, if you have Mac, connected to the same network, you can extract the password from it (as described in the article) and use it on iPhoneAn alternative is to reset the password on the router.

What should I do if I forgot my router password?

If you cannot log into the router's web interface due to loss of login/password:

  • Try standard combinations (admin/admin, admin/1234 or an empty password).
  • Check the information on the sticker on the back of the router.
  • Reset the router using the button Reset (hold for 10-15 seconds). Attention: This will disconnect all users from the network!
  • Contact your provider's support team—they can reset your password remotely.