It's common to need to connect a new device to your wireless router but lose or forget the access key. Fortunately, operating systems store this data in their databases, and it can be retrieved using built-in tools without installing third-party software. This is especially true if you've moved, changed providers, or simply haven't checked your network settings in a while.
In this article, we'll detail the steps for the most popular platforms, including the latest versions of Windows and macOS. You'll learn where to look for hidden asterisks and how to retrieve them in readable form using system utilities. The key is to have physical access to a device that's already successfully authenticated to the network.
Extracting data through the Windows 10 and 11 GUI
The easiest way for users who don't like the command line is the standard network connections menu. In the operating system Windows 10 The interface is slightly different in version 11, but the logic remains the same. You'll need to open the Network Control Panel to find the connection you need.
Right-click the Wi-Fi icon in the system tray (lower-right corner of the screen) and select "Network and Internet settings." Next, find the "Network and Sharing Center" link or go to "Advanced network settings." Here you will see a list of active connections.
Click on the name of your wireless network (the blue text next to "Connections"). A small status window will open, where you should click "Wireless Network Properties." In the dialog box that opens, switch to the "Wireless Network" tab. SecurityThis is where the data you are looking for is located.
In the "Network Security Key" field, characters are hidden by dots. To see them, check the "Show entered characters" box. The system may ask for administrator permissions—this is a standard data protection procedure.
⚠️ Note: If you don't have administrator rights on this computer, the system won't allow you to remove the password mask. In this case, you'll need to log in using an account with full rights.
Using the Command Prompt (CMD) for Advanced Users
For those who prefer quick access to system functions, the command console is ideal. This method is universal and works even when the graphical interface isn't working correctly. You'll need to run Command line or PowerShell as administrator.
First, you need to get a list of all saved profiles on this laptop. Enter the command netsh wlan show profiles and press Enter. The system will display a list of all networks the device has ever connected to. Find the exact name of your network in the list.
Now we'll use the command to display the key. The syntax is as follows:
netsh wlan show profile name="Network_Name" key=clear
Instead of Network_Name Substitute the exact name of your Wi-Fi network (including capitalization and spaces). After the command runs, scroll to the "Security Settings" section. The "Key Content" line will display the access code you're looking for.
☑️ Check before entering a command
This method is especially convenient if you need to quickly copy a password by selecting it with your mouse directly in the terminal window. You can also see the encryption type (usually WPA2-Personal) and Authentication type.
Features of password extraction in macOS
Apple laptop owners must use iCloud Keychain or a local keychain. The macOS security interface strictly controls access to stored data. To get started, open the Keychain Access app using Spotlight search (Cmd+Space).
In the list on the left, select the "Passwords" category. In the list on the right, find the name of your wireless network. Double-click it to open its properties. In the window that opens, check the "Show password" box.
The system will require authorization: enter your macOS account password or use Touch ID. After confirmation, the password field will become editable and visible. You can copy it or simply view it.
In newer versions of macOS (Ventura, Sonoma) the path may be slightly different: System Preferences → Wi-Fi → "Advanced" button (or three dots) → Find Network → "Show" buttonBiometric or password authentication will also be required here.
What should I do if Keychain Access won't open?
If the application isn't responding, try restarting the "keychainaccess" process through Activity Monitor or restarting the laptop. Sometimes resetting the NVRAM helps.
Analyzing saved profiles via PowerShell
PowerShell offers more flexible options for scripting and working with network objects than the standard CMD. This method is advantageous because it allows you to output data in a more structured format or export it. Open PowerShell with administrator privileges.
The command for obtaining an XML profile file contains the entire data array, including keys. However, there is a simpler way to obtain plain text. Use the following structure:
(netsh wlan show profile name="Name" key=clear) | Select-String"Key Content"
This command filters the output, leaving only the line containing the key. This is useful if you're writing a script or want to quickly see the result among a large amount of text. Note that the network name must be enclosed in quotation marks if it contains spaces.
It's important to understand the difference between user profiles and system profiles. Commands netsh Work with the current user context. If a profile was saved only for one user, it may not be visible to another.
Comparison of Wi-Fi data access methods
The choice of method depends on your operating system, your system access level, and personal preference. A graphical interface is easier for beginners, while a console provides more control. Below is a table to help you choose the best method.
| Method | OS | Complexity | Necessary rights |
|---|---|---|---|
| Network and Sharing Center | Windows | Low | Administrator |
| Command Prompt (CMD) | Windows | Average | Administrator |
| Bunch of keys | macOS | Average | User/TouchID |
| PowerShell | Windows | High | Administrator |
As the table shows, the CMD method remains the most universal for Windows, as it works on all versions of Windows from 7 to 11 without syntax changes. For Mac, there are virtually no alternatives other than third-party utilities.
Possible errors and solutions
When trying to view your password, you may encounter access errors. The system often displays "Access Denied" or "The parameter is incorrect." This may be due to antivirus software or group security policies blocking the password.
If the command prompt doesn't see the profile, make sure you've spelled the network name correctly. Letters are case-sensitive. Also, check whether your laptop is currently connected to this network or has been connected before.
⚠️ Note: On corporate networks, access to saved passwords may be blocked by the domain administrator. In this case, standard methods will not work.
Sometimes resetting network settings helps. In Windows 10/11, this can be done via Settings → Network & Internet → Advanced network settings → Network resetAfter rebooting, you will have to enter the password again, but this will solve problems with corrupted profiles.
Frequently Asked Questions (FAQ)
Is it possible to view the Wi-Fi password if the laptop is not currently connected to the network?
Yes, you can. The operating system stores profiles of all networks the device has previously connected to. You can retrieve the access key from a saved profile, even if Wi-Fi is currently off or you're out of range.
Is it safe to use third-party password recovery programs?
Using unknown software carries risks. Many "password recovery" programs contain adware or viruses. Built-in Windows and macOS tools (CMD, PowerShell, Keychain Access) are completely safe and don't require any additional software.
What should I do if the command line says "Network not found"?
Check the exact profile name with the command netsh wlan show profilesThe name in the command must match the symbol. If the profile was deleted or the system was reinstalled, the data may have been lost.
Where are Wi-Fi passwords stored in the file system?
In Windows, they are stored in encrypted form in system files at the path C:\ProgramData\Microsoft\Wlansvc\Profiles\InterfacesDirect reading of these files without special decryption keys is impossible, so using the netsh interface is the only standard method.