How to find your WiFi password in Windows 10 using the command line

A situation where you need to know Wi-Fi network password, to which a laptop or computer is already connected, occurs quite often. Perhaps you bought a new router, forgot the password, or have friends visiting who urgently need to share the internet. Built-in operating system tools Windows 10 allow you to hide password characters in the graphical interface, but do not remove them from the system memory.

Fortunately, command line (CMD) provides powerful and fast access to saved wireless network configurations. You don't need to install third-party software or have superuser privileges outside of your account if you're the device administrator. This method is standard and secure.

In this guide, we will analyze a step-by-step algorithm of actions that will allow you to extract security key in seconds. We'll cover not only basic commands but also possible errors and alternative ways to view data using system utilities. This knowledge is essential for any advanced PC user.

Launch Command Prompt with Administrator Privileges

The first step to executing system commands is to launch a terminal with elevated privileges. Normal user mode may not provide sufficient access to WLAN profiles. There are several ways to open the required interface, and the choice depends on your navigation preferences. Windows 10.

The fastest option is to use search. Click the magnifying glass icon in the taskbar or press Win + S, enter your query cmd or command lineThe Command Prompt application will appear in the search results. Right-click on the found item and select Run as administratorThe system will ask for confirmation via UAC (User Account Control).

An alternative method involves using the Run menu. Press the key combination Win + R, in the window that appears, enter the command cmd and press Ctrl + Shift + EnterThis keyboard shortcut automatically launches the program as an administrator, eliminating the need to right-click. If you prefer to use the Start menu, locate the Windows System folder, expand it, find Command Prompt, right-click, select Advanced, and then Run as administrator.

⚠️ Warning: Running Command Prompt as an administrator gives the program full control over the system. Be careful when entering commands from untrusted sources, as they may change system files or security settings.

After successful launch, a terminal window will open with the path to the system folder System32The window title should contain the word "Administrator." If you only see the path to your user folder without administrator rights, the password viewing commands may not work or will return an access error.

View a list of saved Wi-Fi networks

Before requesting a specific password, you must ensure that the desired network profile is actually stored in the operating system's memory. Windows 10 Stores data on all access points to which the device has previously connected with successful authorization. A built-in utility is used to display this list. netsh.

Enter the following command into the command line and press Enter:

netsh wlan show profiles

After executing the command, the system will display a block of information titled "User Profiles." The "Profile Names" column will list all available networks. Note that the names may match the SSID (the visible name of the network), but in some cases, especially in corporate settings or when manually creating profiles, they may differ.

If the list is empty, this means that this computer has never connected to a Wi-Fi network before, or the profiles were deleted manually or by resetting the network settings. In this case, it's impossible to find the password via the command line, as the system has nothing to display. You'll need to find a device that remembers the password or use the sticker on the router.

📊 How do you usually find out your Wi-Fi password?
I'm looking at the router's sticker.
I ask the owner
I use the command line
Application on the phone

To easily analyze a large list of networks, you can copy the command output to a text file. To do this, use the following syntax:

netsh wlan show profiles > C:\users\public\wifi_list.txt

This command will create a text document at the specified path containing a complete list of profiles. This is especially useful if you need to find a network among dozens of saved connections and scrolling through the terminal screen is inconvenient.

Command to display the password of a specific network

Once the desired profile name is found, it's time to obtain the security key itself. The command syntax requires the profile name to be specified precisely. If the network name contains spaces, they must be enclosed in quotation marks; otherwise, the command line will interpret the name as multiple arguments and return an error.

The basic command to display (detailed information) about a profile, including the password, is as follows:

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

Instead of Network_Name Please insert the exact name you saw in the list in the previous step. The key parameter here is key=clearThis parameter instructs the system to display the contents of the "Security Key" field in plain text. Without this parameter, the system will only display asterisks or not display the key at all.

Once completed, you'll see a large block of text with various technical information: encryption type, radio mode, and authorization type. We're interested in this section. Security parameters (Security settings). In the line Key content (Key Content) the password you are looking for will be displayed.

☑️ Check before entering a command

Completed: 0 / 1

If the command prompt returns an error message such as "Group parameter not found" or "Profile not found," check the spelling of the name. Users often forget about the case of letters or extra characters. Also, make sure you are in the WLAN context, even though the command netsh wlan usually works globally.

Analysis of security and encryption parameters

The resulting report contains not only the password but also important information about how secure your connection is. Understanding these parameters will help you assess your network's vulnerability to potential attacks. The security section displays the encryption type used. Wi-Fi router.

The most common standards are:

  • 🔒 WPA2-Personal — a modern standard using AES encryption. It's considered secure for home use.
  • 🔓 WEP — an outdated and extremely vulnerable protocol. If your network uses it, your password can be cracked in minutes, even without access to your PC.
  • 🔐 WPA3 — the latest security standard that provides maximum protection against password guessing.

You can also see the type of data encryption in the report. The optimal option is AESIf you see TKIPThis may indicate the use of older hardware or mixed operating modes, which reduces overall network speed and security. Windows 10 may warn you about weak security settings, but the connection will still work.

Parameter Description Recommended value
Authentication type Client authentication method WPA2-Personal / WPA3
Encryption Algorithm for encoding transmitted data AES
Key type Security key storage format ASCII (usually)
Key content The network password itself Complex combination

Pay attention to this information, especially if you're connecting to public or guest networks. If the settings say "No" or "Open," the network isn't password-protected, and all your traffic is visible to other users within range.

Alternative method via graphical interface

While the command line is a powerful tool, sometimes it's faster to use the standard Windows settings window, especially if you don't like working with code. This method doesn't require entering commands, but it does involve more mouse clicks. It's useful if you just need to quickly view your password on the screen.

The algorithm of actions is as follows:

  1. Open "Settings" (Start menu -> Gear) or click Win + I.
  2. Go to the section Network and Internet.
  3. In the left column, select "Wi-Fi", then click "Change adapter settings" (or "Network and Sharing Center" in older versions).
  4. In the window that opens, find the active connection and left-click on it.
  5. In the status window, click the button Wireless network properties.
  6. Go to the "Security" tab and check the "Show entered characters" box.

This method only works for the network you're currently connected to. If you need to find the password for a network your computer has connected to in the past but isn't currently connected to, the Windows 10 graphical interface won't let you do it directly. Here, the command line or third-party utilities come to the rescue again.

⚠️ Note: The Windows Settings interface may differ depending on the build version (21H2, 22H2, etc.) and the availability of updates. The button layout may change, but the logic for navigating through "Properties" remains the same.

If the Security tab is missing or the Show characters as you type button is grayed out, this may mean that the profile is stored in the system context rather than the user context, or there are group security policies in effect that prohibit viewing keys.

Deleting profiles and managing saved networks

Knowing how to view a password is useful, but managing your network list is also important. Over time, profiles from cafes, hotels, and friends accumulate in your network memory, which can cause connection conflicts or simply take up space. Furthermore, deleting an old profile may be necessary if you've changed the router password and Windows is still trying to connect with the old credentials.

To delete a specific profile, use the command:

netsh wlan delete profile name="Network_Name"

This command will completely remove the network entry and associated password from the Windows registry. After this, the system will prompt you for the password again when you try to connect. This is a great way to refresh your connection if you're experiencing frequent disconnects or authentication errors.

What to do if the command fails?

If the system says "Access Denied," make sure you're running the command prompt as an administrator. If it says "Profile not found," check the network name, taking into account case and spaces. You can copy the network name from the list using Ctrl+C (in newer versions of Terminal) or simply carefully retype it. If the command doesn't work, check the permissions and spell the profile name correctly. Restarting the WLAN AutoConfig service sometimes helps.

To delete all profiles at once (radical method), you can use the command:

netsh wlan delete profile name= i=

Be careful with this command, as it will erase all saved Wi-Fi passwords on your computer, requiring you to re-enter them for all known networks. This is useful when completely reconfiguring the system or before selling the computer.

Common mistakes and how to solve them

When working with the command line, users often encounter common problems. Understanding the causes of these problems will save you time. Most often, errors are related to syntax or access rights.

List of common problems:

  • Error: "WLAN AutoConfig service is not running": This means that the system service responsible for Wi-Fi has stopped. Click Win + R, enter services.msc, find "WLAN AutoConfig Service" in the list, right-click and select "Start".
  • Error: "Element not found"You most likely misspelled your profile name. Be mindful of case sensitivity and spaces. Use quotation marks around names with spaces.
  • Empty password in output: If the "Key Contents" line is empty, the network may be using an authentication method that does not require a password (open network), or the profile may be corrupted.

It's also worth mentioning that on some corporate computers, access to the command prompt or the ability to view security keys may be blocked by the system administrator via Group Policy. In this case, even with local administrator rights, you may not achieve the desired results.

If standard methods don't work, you can try resetting your network settings completely. This can be done through "Settings" -> "Network & Internet" -> "Status" -> "Network Reset." This will reinstall your network adapters and reset all settings to factory defaults, which often resolves connection issues, but will require you to re-enter all your passwords.

Is it possible to find out the Wi-Fi password if the computer is not connected to it?

Yes, you can, but only if the network profile was previously saved on this computer. The command prompt reads data from the Windows registry, which stores the profiles of all networks the device has ever connected to. If the profile was deleted or never created, you won't be able to find the password using CMD.

Is it safe to use netsh command to view passwords?

Yes, this is a standard Windows operating system function designed for network diagnostics and management. This command doesn't install any third-party programs or transmit data to the internet. However, if you have a mining trojan or malware with administrator privileges, it could theoretically also use this command to steal your passwords, so general antivirus protection is essential.

What if the network name contains special characters?

If the network name contains spaces, quotation marks, or other special characters, be sure to enclose the name in double quotation marks when entering the command. For example: netsh wlan show profile name="My Wi-Fi #1" key=clearIf the name itself contains quotation marks, you need to escape them or use single quotes to enclose the entire string, although in Windows CMD, double quotes usually do the job if the name is inside them.

Does this method work on Windows 7 and 8?

Yes, team netsh wlan Works on all versions of Windows starting with Vista, including Windows 7, 8, 8.1, 10, and 11. The command syntax remains identical, so these instructions are universal for most modern Windows-based PCs.