
How to Find Wifi Password Using Cmd? Show Network Password Quickly
Introduction If you have ever connected a Windows computer to a wireless network and later forgotten the password, you are not alone. Windows stores many saved Wi-Fi profiles, and the built-in Command Prompt can reveal the password for a network that was previ
Introduction
If you have ever connected a Windows computer to a wireless network and later forgotten the password, you are not alone. Windows stores many saved Wi-Fi profiles, and the built-in Command Prompt can reveal the password for a network that was previously connected. This guide explains How to Find Wifi Password Using Cmd? in a clear, step-by-step way, while also covering safety, troubleshooting, and alternative methods. You do not need third-party software, and in most cases you only need an administrator-level Command Prompt window.
The method relies on the netsh wlan commands, which are included with Windows. These commands can list every saved wireless profile and display the security key for a selected profile. Because the password is shown in plain text, you should use this technique only on devices and networks that you own or are authorized to manage.
Table of Contents
- What Does It Mean to Find a Wi-Fi Password Using Command Prompt?
- When This Method Is Useful
- Prerequisites Before You Start
- Basic Steps: How to Find Wifi Password Using Cmd?
- Show Network Password Quickly for All Saved Networks
- Understanding the Command Output
- Troubleshooting Common Issues
- Security and Privacy Considerations
- Alternative Methods Compared
- Tips and Best Practices
- Frequently Asked Questions
- Conclusion
What Does It Mean to Find a Wi-Fi Password Using Command Prompt?
When you connect to a Wi-Fi network and choose to remember it, Windows creates a wireless profile. That profile can include the SSID, authentication type, encryption type, and, in many cases, the security key. Command Prompt can read this stored information through the Network Shell utility, commonly called netsh.
So, when someone asks How to Find Wifi Password Using Cmd?, the practical answer is to use netsh wlan show profiles to list saved networks and then use netsh wlan show profile name="NetworkName" key=clear to reveal the stored password. The phrase key=clear tells Windows to display the key in readable form instead of hiding it.
This is not a hacking technique. It only works for networks already saved on your computer. If the network was never connected to, or if the password was not stored, Command Prompt cannot magically recover it. The method is best understood as a local credential lookup tool built into Windows.
When This Method Is Useful
There are several everyday situations where knowing How to Find Wifi Password Using Cmd? can save time. You may have forgotten the password after setting up a router months ago. You may need to connect a phone, tablet, smart TV, or guest laptop to the same network. You may be helping a family member and only have access to the main Windows PC. You may also be troubleshooting a network and need to confirm which password is currently stored.
Another common scenario is moving to a new device. If your old laptop remembers the network but your new laptop does not, the Command Prompt method can help you retrieve the password without resetting the router. Similarly, small office administrators may use it to verify that the correct profile is installed on a managed Windows device.
However, this method should not be used to access networks without permission. If you are on a work, school, or public device, organizational policies may prohibit viewing stored credentials. Always make sure you have authorization before retrieving any Wi-Fi password.
Prerequisites Before You Start
Before trying to find a Wi-Fi password with Command Prompt, make sure the following conditions are met:
- You are using a Windows computer, such as Windows 10 or Windows 11.
- The Wi-Fi network has been connected to and saved on that computer.
- You have administrator privileges, or can open Command Prompt as an administrator.
- You know the exact or approximate network name, also called the SSID.
- You are authorized to view the password for that network.
If the computer has never connected to the network, the profile will not exist. In that case, you will need another method, such as checking the router label, router admin panel, or password manager. If the network uses enterprise authentication, such as WPA2-Enterprise or WPA3-Enterprise, the stored credential may be a user account rather than a simple shared password.
Basic Steps: How to Find Wifi Password Using Cmd?
The basic process has two main stages: list the saved profiles, then reveal the key for the profile you need. Follow these steps carefully.
Open Command Prompt as Administrator
Press the Windows key, type cmd, and look for Command Prompt in the search results. Instead of simply pressing Enter, right-click Command Prompt and choose Run as administrator. If prompted by User Account Control, select Yes. Running as administrator is important because Windows may hide the key content from a standard user session.
You can also press Windows + R, type cmd, and then press Ctrl + Shift + Enter. This shortcut opens Command Prompt with elevated privileges. When the window opens, the title bar should indicate Administrator, and the prompt may begin with an elevated path.
List All Saved Wi-Fi Profiles
Type the following command and press Enter:
netsh wlan show profiles
This command displays all wireless profiles saved on the computer. Look under the section that lists user profiles. You will see network names, one per line. Identify the exact name of the network whose password you want to recover. If the name contains spaces, keep the full name exactly as shown, including spaces and capitalization where possible.
Reveal the Password for One Network
Once you know the profile name, run this command, replacing NetworkName with the actual SSID:
netsh wlan show profile name="NetworkName" key=clear
For example, if your network is called HomeWiFi, the command would be:
netsh wlan show profile name="HomeWiFi" key=clear
After pressing Enter, scroll through the output until you find the Security settings section. Look for a line named Key Content. The value next to it is the saved Wi-Fi password. If the value is blank or shows as absent, the password may not be stored in that profile, or the network may not use a shared key.
Copy the Password Safely
Highlight the password in the Command Prompt window and copy it. You can usually right-click to copy selected text. Paste it into the new device or password field carefully. Avoid typing it manually if it contains complex characters, because one incorrect character can prevent connection.
After you finish, close the Command Prompt window. There is no need to save the output to a file unless you have a specific reason. Saving passwords in plain text files can create a security risk.
Show Network Password Quickly for All Saved Networks
Sometimes you may want to view passwords for multiple saved networks at once. You can use a loop in Command Prompt to process every profile. This is useful if you manage several networks or want to audit stored credentials. However, because it exposes multiple passwords, use it carefully and only on your own device.
Open an elevated Command Prompt and run:
for /f "tokens=2 delims=:" %a in ('netsh wlan show profiles ^| findstr "All User Profiles"') do @for /f "tokens=*" %b in ("%a") do @echo Profile: %b & netsh wlan show profile name="%b" key=clear | findstr "Key Content"
This command finds each saved profile, then runs the key display command for each one. The output shows the profile name and the key content. On non-English Windows installations, the text All User Profiles and Key Content may be different, so you may need to adjust the search terms.
If you want to save the results for later review, you can redirect output to a text file:
for /f "tokens=2 delims=:" %a in ('netsh wlan show profiles ^| findstr "All User Profiles"') do @for /f "tokens=*" %b in ("%a") do @echo Profile: %b & netsh wlan show profile name="%b" key=clear | findstr "Key Content" >> wifi-profiles.txt
Be cautious with this approach. A plain text file containing Wi-Fi passwords can be read by anyone with access to the file. Delete it immediately after use, and never email it or store it in cloud storage.
Understanding the Command Output
The output of netsh wlan show profile contains more than just the password. Understanding each part can help you troubleshoot and verify that you are reading the correct information.
- Profile information: Shows the profile name and whether it is applied to all users or only the current user.
- Connectivity settings: Shows connection mode and whether the network is set to connect automatically.
- Network settings: Shows the SSID name, network type, and radio type.
- Security settings: Shows authentication, cipher, security key presence, and the actual key content when
key=clearis used. - Cost settings: May show whether the network is treated as metered or unmetered.
The most important line is Key Content. If it displays a value, that value is the stored password. If it says the key is absent, the profile may be for an open network, or Windows may not have stored the key. In some enterprise environments, the credential is stored elsewhere, such as in Credential Manager, rather than in the wireless profile key content.
Troubleshooting Common Issues
Even though the process is simple, a few issues can prevent it from working. Here are the most common problems and how to address them.
Access Is Denied
If you see an access denied message, you probably opened Command Prompt without administrator rights. Close the window and reopen it using Run as administrator. On managed business computers, group policy may restrict access to stored wireless keys. In that case, contact your IT administrator rather than trying to bypass the restriction.
The Profile Name Is Not Found
If Windows says the profile could not be found, check the spelling and capitalization. Profile names can include spaces, symbols, and non-English characters. Use quotes around the full name. If you are unsure, run netsh wlan show profiles again and copy the name exactly as displayed.
Key Content Is Absent or Blank
If the password does not appear, the network may be open and have no password. It may also be an enterprise network where authentication is handled differently. Another possibility is that the password was entered but not saved permanently. Reconnecting to the network and choosing to remember it may store the key for future retrieval.
Command Is Not Recognized
The netsh command is built into Windows, so this error is unusual. It may occur if the system path is damaged or if you are using a very old or restricted version of Windows. Try running the command from the System32 directory or use the full path to netsh.exe. Also ensure you are in a standard Command Prompt, not a broken or customized shell.
The Output Is in Another Language
On localized versions of Windows, the labels may not be All User Profiles or Key Content. The loop command may fail because it searches for English text. In that situation, use the basic two-step method and visually inspect the output. You can also change the display language temporarily, but that is usually unnecessary.
Security and Privacy Considerations
Because this method displays passwords in plain text, it deserves careful handling. Anyone who can open an elevated Command Prompt on your computer may be able to view saved Wi-Fi passwords. This is one reason why protecting your Windows account with a strong password and limiting administrator access is important.
Use the technique only for networks you own or are authorized to manage. Do not use it on shared, public, or workplace computers without permission. Avoid saving output files, screenshots, or notes that contain passwords. If you must document a password, use a reputable password manager with encryption.
If you suspect that someone has viewed your stored Wi-Fi password without permission, change the router password and update connected devices. You may also want to review which devices are connected to your network and remove unknown clients. For stronger protection, use WPA3 if your router and devices support it, and keep router firmware updated.
Alternative Methods Compared
Command Prompt is not the only way to recover a saved Wi-Fi password. The best method depends on your device, permissions, and whether you have access to the router. The table below compares common options.
| Method | Speed | Requires Admin | Best For | Limitations |
|---|---|---|---|---|
| Command Prompt with netsh | Fast | Yes | Windows users who need a quick local lookup | Only works for saved profiles and may require elevation |
| Windows Settings Wi-Fi properties | Fast | Sometimes | Users who prefer a graphical interface | Menu location varies by Windows version |
| Router administration page | Moderate | No local admin, but router login needed | Changing or confirming the router password | Requires router credentials and IP address |
| Password manager | Very fast | No | Users who store passwords securely | Only works if the password was saved there |
| IT administrator or network owner | Variable | No end-user admin needed | Managed, school, or business networks | Depends on support availability |
For most home users, Command Prompt and Windows Settings are the fastest options. If you do not have administrator rights, asking the network owner or using a password manager may be more appropriate. If you are managing a router, logging into the router admin page is often the most authoritative way to view or change the password.
Tips and Best Practices
To get the most reliable results when learning How to Find Wifi Password Using Cmd?, keep these tips in mind:
- Always run Command Prompt as administrator before using
key=clear. - Use the exact profile name, including spaces and punctuation.
- Wrap network names in double quotes to avoid parsing errors.
- Use
findstrto filter long output and focus on key content. - Do not save passwords in plain text files unless absolutely necessary.
- Delete temporary output files immediately after use.
- Store recovered passwords in a trusted password manager.
- Update your router password if you believe it has been exposed.
- Remember that this method only works for previously saved profiles.
- Use WPA2 or WPA3 encryption and a strong, unique Wi-Fi password.
These habits make the process faster and reduce the chance of accidentally exposing credentials. They also help maintain good network security after you retrieve the password.
Frequently Asked Questions
Can I find a Wi-Fi password using CMD on any Windows version?
The netsh wlan commands are available on modern Windows versions, including Windows 10 and Windows 11. Older versions may have different behavior or command availability. If the command is unavailable, use Windows Settings or the router admin page instead.
Do I need administrator rights?
Yes, in most cases. Viewing the key content with key=clear usually requires an elevated Command Prompt. Without administrator rights, Windows may show the profile but hide the password.
Will this work for a network I have never connected to?
No. Command Prompt can only read profiles already saved on the computer. If the network was never connected to, there is no stored key to display.
Why is Key Content missing?
The network may be open, the password may not have been saved, or the network may use enterprise authentication. In those cases, the profile may not contain a simple shared password.
Is it legal to use this method?
It is legal when used on your own device and network or with proper authorization. It should not be used to access or view credentials for networks you do not own or manage.
Can I use this method for all saved networks at once?
Yes, you can use a Command Prompt loop to process multiple profiles. Be careful because this exposes multiple passwords in the console or in a file if you redirect output.
Does this change my Wi-Fi password?
No. The commands only read stored profile information. They do not modify the router or network password.
What should I do after finding the password?
Use it to connect your device, store it in a password manager, and close Command Prompt. If you saved the output anywhere, delete it securely. Consider updating the router password if it was exposed.
Conclusion
Learning How to Find Wifi Password Using Cmd? is a practical skill for Windows users who need to recover a forgotten or misplaced Wi-Fi password. By using netsh wlan show profiles and netsh wlan show profile name="NetworkName" key=clear, you can quickly reveal passwords stored in saved wireless profiles. The method is fast, built into Windows, and does not require extra software.
At the same time, it should be used responsibly. Only retrieve passwords for networks you own or are authorized to manage, run Command Prompt with appropriate privileges, and avoid storing exposed credentials. Combine this technique with strong Windows account security, a password manager, and modern Wi-Fi encryption to keep your network safe while still making access convenient when you need it.