
How to See Wifi Password in Computer? Use Command Prompt
Introduction It happens to almost everyone at some point. You are sitting at home, a friend comes over with a new phone, or you buy a new laptop, and suddenly you need the WiFi password. The only problem is that you set it up months or years ago, wrote it on a
Introduction
It happens to almost everyone at some point. You are sitting at home, a friend comes over with a new phone, or you buy a new laptop, and suddenly you need the WiFi password. The only problem is that you set it up months or years ago, wrote it on a scrap of paper you can no longer find, and now you are stuck. If your computer has already connected to that wireless network, there is a good chance the password is still stored somewhere in the system.
One of the quickest ways to retrieve it without installing third-party software is by using Command Prompt. This built-in Windows tool can query saved wireless profiles and display the security key in plain text. In this guide, we will walk through exactly How to See Wifi Password in Computer? using Command Prompt, along with alternative methods for other operating systems, troubleshooting tips, and important security considerations.
Before we begin, it is worth noting that this method only works for networks your computer has previously connected to. You cannot use it to discover the password of a random network within range, nor should you attempt to do so. The goal is to recover credentials you already have permission to use.
Table of Contents
- Introduction
- Why You Might Need to See Your WiFi Password
- Prerequisites Before Using Command Prompt
- How to See Wifi Password in Computer? Using Command Prompt on Windows
- Step 1: Open Command Prompt as Administrator
- Step 2: List All Saved WiFi Profiles
- Step 3: Reveal the Password for a Specific Network
- Step 4: Interpret the Output
- Alternative: Viewing WiFi Password via Network Connections (GUI)
- Alternative: Viewing WiFi Password on Mac
- Alternative: Viewing WiFi Password on Linux
- Comparison Table: Command Prompt vs Other Methods
- Tips and Best Practices for WiFi Password Management
- Security Warnings and Ethical Considerations
- Troubleshooting Common Issues
- Frequently Asked Questions
- Conclusion
Why You Might Need to See Your WiFi Password
There are many legitimate reasons to look up a wireless password. Perhaps you recently reset your router and forgot to update the note on your fridge. Maybe you are helping a family member connect a smart TV, printer, or security camera, and the device keeps asking for the network key. In some workplaces, employees need to add a personal device to the office WiFi but the IT department is unavailable for the next few hours.
It is also common to need the password after buying a new computer. If your old laptop is broken but still powers on, you might be able to extract the saved credentials from it using Command Prompt before retiring the machine. Likewise, if you share your home network with guests regularly, having the password handy avoids the awkward moment of digging through router settings while everyone waits.
Understanding why you need the password helps determine which method is appropriate. If you are already connected to the network on your Windows machine, Command Prompt is often the fastest route. If you are trying to connect a device that does not support entering long passwords easily, such as a smart bulb or gaming console, you may want to consider generating a simpler guest network password instead.
Prerequisites Before Using Command Prompt
Before you open Command Prompt, make sure a few conditions are met. First, you need a Windows computer. The commands covered in this article are specific to the Windows operating system and its built-in networking tools. Second, you must have previously connected to the WiFi network in question. Windows does not store passwords for networks it has never joined, so this method cannot reveal credentials for a network you have never accessed.
Third, you need administrative privileges. Many network commands require elevated access because they touch system-level security settings. If you try to run them from a standard user prompt, you will likely receive an access denied error. Finally, you should only attempt this on computers you own or have explicit permission to manage. Using these commands on someone else’s device without authorization can violate privacy policies and, in some cases, the law.
It is also helpful to know the exact name of the wireless network, also called the SSID. If you are unsure of the spelling, the first step in our guide will show you how to list every saved profile so you can copy the name correctly. Before learning How to See Wifi Password in Computer? using Command Prompt, verify that you meet these basic requirements.
How to See Wifi Password in Computer? Using Command Prompt on Windows
Windows stores wireless network information in profiles. Each profile contains the SSID, security type, encryption settings, and the password itself. The Command Prompt utility called netsh (Network Shell) allows administrators to query and modify these profiles. By using netsh wlan commands, you can list saved networks and reveal their security keys in plain text.
This method is popular because it does not require downloading any software, it works on nearly all modern versions of Windows, and it displays the actual password rather than just dots or asterisks. Below is the complete step-by-step process.
Step 1: Open Command Prompt as Administrator
Click the Start button or press the Windows key on your keyboard. Type cmd or Command Prompt into the search box. When the Command Prompt app appears in the results, do not simply click it. Instead, right-click the result and select Run as administrator from the context menu.
If a User Account Control dialog appears asking whether you want to allow this app to make changes to your device, click Yes. You should now see a Command Prompt window with a title bar that reads Administrator: Command Prompt. This elevated session is necessary because viewing stored WiFi passwords involves reading protected system data.
If you are on a work or school computer and do not see the Run as administrator option, your organization may have restricted this feature. In that case, you will need to contact your IT administrator or use a different device where you have full rights.
Step 2: List All Saved WiFi Profiles
With the administrator Command Prompt open, type the following command and press Enter:
netsh wlan show profiles
Windows will respond with a list of all wireless networks your computer has ever connected to while saving the credentials. The output looks something like this:
Profiles on interface Wi-Fi:
Group policy profiles (read only)
--------------------------
None
User profiles
-------------
All User Profile : HomeNetwork
All User Profile : Office_Guest
All User Profile : CoffeeShop_WiFi
Look through the list and find the exact name of the network you need. Copy it carefully, including capitalization, spaces, and any special characters. If you do not see the network here, it means Windows does not have a saved profile for it, and the Command Prompt method will not work.
Step 3: Reveal the Password for a Specific Network
Once you have the network name, use the following command to display detailed information about that profile, including the password. Replace YOUR_NETWORK_NAME with the actual SSID you copied in the previous step. Keep the quotation marks around the name.
netsh wlan show profile name="YOUR_NETWORK_NAME" key=clear
For example, if your network is called HomeNetwork, the command would be:
netsh wlan show profile name="HomeNetwork" key=clear
Press Enter and wait for the output. Windows will print several sections of information, including connection settings, security settings, and cost settings. Scroll down until you find the section labeled Security settings.
Step 4: Interpret the Output
Inside the Security settings section, look for a line that reads Key Content. The text immediately following it is your WiFi password in plain text. It might look like this:
Security key : Present
Key Content : MySecurePassword123
If the line says Key Content : with nothing after it, the network may not have a password stored, or it may use an enterprise authentication method that does not save a simple pre-shared key in the user profile. If you see Security key : Absent, the network is open and does not require a password.
Once you have located the password, you can copy it and use it on any other device. Be careful not to share it publicly or write it in an unsecured location.
Alternative: Viewing WiFi Password via Network Connections (GUI)
If you are not comfortable using Command Prompt, Windows also offers a graphical way to view the password for the network you are currently connected to. Press Windows + R, type ncpa.cpl, and press Enter to open Network Connections. Right-click your active WiFi adapter and choose Status. In the WiFi Status window, click Wireless Properties, then navigate to the Security tab.
You will see a checkbox labeled Show characters. Check it, and the network security key will appear in the box below. This method is quick and visual, but it only works for the network you are actively connected to right now. It will not show passwords for networks you joined in the past but are no longer within range of.
Command Prompt remains more powerful for retrieving old or saved profiles, while the GUI method is better for immediate, on-the-spot checks.
Alternative: Viewing WiFi Password on Mac
Mac users have a different built-in tool called Keychain Access. Open Spotlight by pressing Command + Space, type Keychain Access, and press Enter. In the Keychain Access window, look for the category called Passwords on the left side, or use the search bar in the upper right corner to type the name of your WiFi network.
Double-click the network entry that appears. A new window will open with several tabs. Click the Attributes tab, then look for a checkbox labeled Show password. When you check it, macOS will ask for your administrator username and password. After you provide those credentials, the WiFi password will be revealed in plain text.
This method is reliable, but like the Windows GUI method, it generally works best for networks the Mac has joined before. It also requires you to know the Mac’s administrator password, which adds a layer of security but can be a hurdle if you have forgotten it.
Alternative: Viewing WiFi Password on Linux
Linux distributions vary widely, but many modern desktop environments use NetworkManager to manage wireless connections. On systems such as Ubuntu, saved network configurations are often stored in the /etc/NetworkManager/system-connections/ directory. Each file in that folder corresponds to a saved WiFi network.
To view a password, you typically need root access. You might use a command like:
sudo cat /etc/NetworkManager/system-connections/YOUR_NETWORK_NAME.nmconnection
Inside the file, look for a section labeled [wifi-security] and a key called psk. The value next to it is the pre-shared key, or WiFi password. Some distributions also support the nmcli command-line tool for querying connection details, though extracting the plain-text password usually requires file access and sudo privileges.
Because Linux setups differ so much, this method is less universal than the Windows Command Prompt approach. If you are using Linux, consult your specific distribution’s documentation for the exact file paths and tools.
Comparison Table: Command Prompt vs Other Methods
| Method | Operating System | Difficulty | Speed | Requires Admin | Shows Saved Passwords | Best For |
|---|---|---|---|---|---|---|
Command Prompt (netsh wlan) |
Windows | Moderate | Fast | Yes | Yes | Retrieving old or saved network passwords |
| Network Connections GUI | Windows | Easy | Very Fast | No | No (current connection only) | Quick check while already connected |
| Keychain Access | macOS | Moderate | Fast | Yes | Yes | Mac users recovering saved WiFi keys |
| NetworkManager Files | Linux | Advanced | Moderate | Yes | Yes | Linux users comfortable with terminal and sudo |
| Router Admin Page | Any (via browser) | Easy | Moderate | Yes (router admin) | Yes | Changing or resetting the main WiFi password |
As the table shows, Command Prompt strikes a strong balance for Windows users who need to recover passwords for networks they are not currently connected to. The router admin page is useful if you want to change the password entirely, but it requires access to the router itself and its administrator credentials.
Tips and Best Practices for WiFi Password Management
Recovering a forgotten password is helpful, but it is even better to avoid losing it in the first place. Consider using a reputable password manager to store your WiFi credentials alongside your other login details. Many password managers allow you to attach notes, so you can record the router model, ISP name, and date the password was last changed.
Create a separate guest network for visitors. Most modern routers support this feature, and it lets you share internet access without giving guests your primary password or access to local devices like printers and network-attached storage. If you do share your main password, consider changing it afterward, especially if the guest will not need regular access.
Change the default administrator password on your router. Many routers ship with well-known default credentials such as admin and password. Leaving these unchanged means anyone connected to your WiFi could potentially log into your router settings and view or change your wireless password.
Use WPA3 if your router and devices support it. If not, WPA2 with AES encryption is still secure for most home users. Avoid WEP, which is outdated and easy to crack. Finally, make your WiFi password long and memorable but hard to guess. A passphrase made of random words is often easier to type on a phone than a short string of random characters.
Security Warnings and Ethical Considerations
The ability to reveal stored WiFi passwords comes with responsibility. Only use Command Prompt to view passwords on computers you own or manage with explicit permission. Attempting to access someone else’s saved network credentials without authorization is unethical and may violate computer crime laws in your jurisdiction.
Be aware that anyone with physical access to your computer and administrative rights can run these same commands to see your saved WiFi passwords. If you leave your laptop unlocked in a public place, a malicious user could quickly retrieve your home network key. Always lock your computer when stepping away, and consider using a strong login password or biometric authentication.
Avoid downloading third-party “WiFi password reveal” tools from unknown websites. Many of these programs are bundled with malware or adware. The built-in Command Prompt method is safer because it uses Microsoft’s own utilities and does not require installing additional software.
Finally, remember that seeing a password does not give you the right to share it indiscriminately. Treat your WiFi password like you would treat the key to your front door.
Troubleshooting Common Issues
Even with the correct steps, things do not always go as planned. Here are some common problems and how to fix them.
Command not recognized or netsh error: Make sure you typed the command exactly as shown, including spaces and quotation marks. Also confirm you are using Windows; these commands will not work on macOS or Linux.
The wireless profile does not exist: Double-check the network name spelling. SSIDs are case-sensitive. If you copied the name from Step 2, paste it directly into the command to avoid typos.
Access denied: You must run Command Prompt as administrator. Right-click the app and select Run as administrator before typing any commands.
Key Content is blank: This can happen if the network uses enterprise security (such as WPA2-Enterprise) rather than a personal pre-shared key. It can also happen if the password was never saved to the local user profile.
Command Prompt closes immediately: Make sure you are not accidentally running a batch file or shortcut that exits after execution. Launch cmd.exe directly from the Start menu.
If you continue to have trouble, the GUI method or logging into your router’s administration page may be more reliable alternatives.
Frequently Asked Questions
Q: Can I see the password for the WiFi network I am currently connected to?
A: Yes. If your computer is connected and has saved the profile, Command Prompt can reveal the password. The GUI method also works for active connections.
Q: Does this work on public WiFi networks?
A: Only if your computer has previously connected to that public network and saved the password. You cannot use it to discover the password of a public hotspot you have never joined.
Q: Can I see WiFi passwords without administrator rights?
A: Generally, no. Viewing stored security keys requires elevated privileges because it accesses protected system information.
Q: Is using Command Prompt to see a WiFi password safe?
A: Yes, when used on your own device. It is a built-in Windows tool and does not expose your system to external risk. Avoid third-party password recovery tools from untrusted sources.
Q: What if I never connected to this WiFi before?
A: The Command Prompt method will not work. Windows only stores passwords for networks it has joined previously. You will need to obtain the password from the network owner or router administrator.
Q: Can I use this method to hack into a neighbor’s WiFi?
A: No. This method only reveals passwords your own computer has already saved. It cannot crack or guess passwords for networks you have never accessed. Attempting to access networks without permission is illegal and unethical.
Conclusion
Forgetting a WiFi password is frustrating, but it does not have to mean resetting your router or calling customer support. If your Windows computer has connected to the network before, Command Prompt provides a built-in, reliable way to recover the saved security key. By opening Command Prompt as an administrator, listing your wireless profiles, and querying the specific network with key=clear, you can How to See Wifi Password in Computer? in just a few minutes.
We also explored alternative methods for Windows, macOS, and Linux, compared their strengths and weaknesses, and reviewed best practices for keeping your network secure. Remember to use these tools responsibly, only on devices you own or manage, and to protect your computer with a strong login password so others cannot easily extract your saved credentials.
The next time a friend asks for your WiFi password, you will know exactly where to find it—no sticky notes required.