How to view your Wi-Fi password on Windows 10 using the command line

Many Windows users are familiar with the situation of needing to connect a new device to a wireless network but forgetting or losing the password. Fortunately, if your computer or laptop is already connected to the desired access point or has been connected to one before, the system stores the security key in its records.

There are several ways to extract this information, but the most reliable and fastest method is to use the built-in command line interface. This tool allows access to hidden network settings without installing third-party software, which is especially important for corporate computers or systems with limited access rights.

In this guide, we'll walk you through the process of recovering a forgotten security key using standard Microsoft utilities. You'll learn how to use commands to display saved profiles and decrypt encryption keys directly in text format.

Preparing the working environment and launching the console

The first step before entering any system commands is to launch the command prompt interface. There are several ways to activate this tool in Windows 10, and the method you choose depends on your current access rights and habits.

The easiest way is to use the search in the Start menu. Start typing cmd or command line, and the system will prompt you to launch the application. However, performing network requests that require viewing passwords may require advanced privileges, although basic profile viewing is often available to the average user.

⚠️ Note: If the system returns an "Access Denied" error when entering commands, try running the console as an administrator by right-clicking on the shortcut and selecting the appropriate option.

An alternative and faster method of launching is to use a keyboard shortcut Win + RIn the Run window that opens, enter the command cmd and press Enter. This will instantly open a black command prompt window, ready for you to enter instructions.

☑️ Check before you start

Completed: 0 / 5

Viewing a list of saved networks

Before searching for a specific key, you need to make sure the network you're interested in is actually stored in your computer's memory. The operating system keeps a log of all connections to which you've successfully logged in.

To get this list, use the command netsh wlan show profilesEnter it into the console and press Enter. The system will immediately generate a report, which will include a "User Profiles" section containing a list of all known SSIDs.

Please note the command syntax: they are sensitive to spaces and case, although Windows ignores case in most cases. If you see your network listed, it means its key is securely stored in the system and can be retrieved.

  • 📡 SSID — This is the wireless network identifier, the visible name that appears when searching for available connections.
  • 🔐 Profile Name — the profile name, which in 99% of cases coincides with the network name, unless you have changed it manually.
  • 📂 Context menu — If you don't want to remember the commands, you can copy the network name directly from the list by selecting it with the mouse and right-clicking.
📊 How often do you forget your Wi-Fi passwords?
Never, I keep it in a notebook
Once a year when purchasing new equipment
Constantly, every month
I only use guest access

Obtaining the password for a specific network

Once you've verified the profile's existence, you can proceed to extracting the secret key. This requires a more specific command that requires the target profile name. The syntax is as follows: netsh wlan show profile name="Network_Name" key=clear.

It's critical to specify the network name correctly. If the name contains spaces, they must be enclosed in quotation marks. Parameter key=clear instructs the system to display the security key in plain text, rather than hiding it with asterisks.

netsh wlan show profile name="Home_WiFi" key=clear

After executing the command, scroll up or carefully examine the output. You're looking for the "Security settings" section. This is where the "Key Content" line is located, where the password you're looking for will be displayed.

Analysis of security and encryption parameters

In the command output, you may notice various encryption parameters such as WPA2-Personal or WPA3Understanding these abbreviations helps you assess the reliability of your network. Modern encryption standards provide a high level of protection for transmitted data.

If the "Key Contents" field displays dots or asterisks instead of characters, this means the system cannot display the password in cleartext. This can happen if the profile was imported from another source without a key, or if the current account does not have sufficient rights to read the saved credentials.

Parameter Description Meaning for the user
Authentication Authentication method Typically WPA2-Personal for home networks
Cipher Data encryption type CCMP (AES) is a security standard
Security key Availability of a key Shows whether the key is saved in the system.
Key Content The password itself Text string for connecting new devices

It's also worth paying attention to the "Radio Type" line. This indicates whether your network operates in the 2.4 GHz or 5 GHz bands. While this doesn't affect the password display, this information is useful for diagnosing connection speed issues.

⚠️ Note: Command line interfaces and field names may differ slightly depending on the Windows 10 build version and interface language (Russian/English).

Alternative methods and graphical interface

If using the console seems too complicated or inconvenient, Windows 10 offers a graphical way to view passwords, although it requires more clicks. This method is useful if you prefer a visual interface to text commands.

To do this, go to "Network and Internet Settings," select "Network and Sharing Center," click the name of your wireless connection, and go to "Wireless Network Properties." The "Security" tab contains a "Network Security Key" field.

Why is the password hidden by default?

The password is hidden behind placeholders (dots) to protect it from prying eyes. To view it, you need to check the "Show entered characters" box, which requires administrator rights.

However, the command line offers the advantage of speed and automation. You can quickly copy the entire report to a text file using output redirection, for example: netsh wlan show profile name="Name" key=clear > c:\wifi_pass.txtThis will create a detailed report file on your C drive.

  • Speed — the console method takes a few seconds versus a minute of wandering through the menu.
  • 📝 Copying — it is easier to select and copy text from the console in its entirety than from the graphical properties window.
  • 🛠 Versatility — the commands work the same on all versions of Windows, starting with Windows 7.

Possible errors and solutions

When working with network commands, users may encounter an error message. The most common error is "Group Policy does not allow..." or "Access is denied." This indicates that the current user does not have permission to read saved credentials.

In corporate networks, administrators often block the ability to view passwords for security reasons. At home, this could mean the profile has been saved for all users, but you're logged in with a restricted account.

A syntax error may also occur if the network name contains special characters. In this case, try enclosing the network name in double quotation marks, as shown in the examples above. An exact match of the profile name is critical to the success of the operation.

Sometimes a profile can become corrupted. If the system reports that the profile is not found, even though the network is listed, try deleting the old profile with the command netsh wlan delete profile name="Name" and reconnect by entering the password manually (if you remember it or find it on the router sticker).

Is it possible to view the password for a Wi-Fi network that the computer has never connected to?

No, this is impossible. Windows only stores passwords that have been successfully used to connect. If the device has never connected to a given access point, the security key simply won't exist in its memory.

Is it safe to use netsh commands to view passwords?

Yes, using built-in Windows commands is completely safe. You don't install third-party software or modify system files; you're simply requesting the display of an already saved configuration.

What should I do if the Key Content field in the command output is empty?

This means the network profile was saved, but the security key wasn't saved with it. This can happen when importing profiles or due to errors. You'll need to find the password on the router's sticker or reset the router.

Does this method work on Windows 11?

Yes, the command line and netsh utility work identically in Windows 11, as the underlying networking stack of the operating system remains virtually unchanged in this regard.