How to retrieve your router credentials from Windows Command Prompt
You can find your router's username and password through Command Prompt by running a command that displays your saved network profiles and their security details. The most direct method uses the netsh wlan show profile command, which pulls the password for any Wi-Fi network your computer has connected to before — including the one broadcast by your router's admin panel if you've ever connected to it. However, this retrieves the Wi-Fi password, not the router login itself. To get the actual router username and password, you'll need to check your router's label or access its configuration page through a browser.
The distinction matters: your Wi-Fi password (what you use to connect devices to the internet) is different from your router admin password (what you use to log into the router's settings page). Command Prompt can help you recover the Wi-Fi password quickly, but the admin credentials usually require a different approach — either finding them on a sticker on the router itself, or resetting the router to factory defaults.
Key Takeaways
- The netsh wlan show profile name="YourNetworkName" key=clear command displays your saved Wi-Fi password in plain text in Command Prompt.
- This method only works for networks your computer has already connected to; it cannot retrieve passwords for networks you've never joined.
- Your router's admin username and password are usually printed on a label attached to the router itself, typically on the back or bottom.
- If you cannot find the label or have changed the password and forgotten it, you can reset the router to factory settings by holding the reset button for 10 to 15 seconds.
- After resetting, you'll need to reconfigure your Wi-Fi network name and password from scratch using the default credentials printed on the router.
Running the netsh command to find your Wi-Fi password
Open Command Prompt as administrator by right-clicking the Command Prompt icon and selecting "Run as administrator." Type the command netsh wlan show profile and press Enter. This displays a list of every Wi-Fi network your computer has connected to in the past. Find the name of your network in the list — it will appear under "Interface : [Your Network Card Name]" and show "Profile : [Network Name]."
Once you've identified your network name, run the command netsh wlan show profile name="YourNetworkName" key=clear, replacing "YourNetworkName" with the exact name from the list. The output will include a line labeled "Key Content" under the "Security settings" section. The string of characters next to "Key Content" is your Wi-Fi password in plain text. Copy it carefully, as it is case-sensitive.
This method only works if your computer has previously connected to that network. If you're trying to recover a password for a network your computer has never joined, Command Prompt cannot retrieve it — you'll need to access the router's admin panel or check the original setup documentation.
Finding your router's admin username and password
Your router's login credentials — the username and password you need to access the router's settings page — are almost always printed on a physical label attached to the router. Check the back, bottom, or sides of the device for a sticker that lists the default username (often "admin"), default password (often "admin" or a blank field), and the router's IP address (usually 192.168.1.1 or 192.168.0.1).
Write down these details before you proceed. The IP address is what you'll type into a web browser's address bar to reach the login page. If the label is worn, faded, or missing, you can often find the same information in your router's manual or on the manufacturer's support website by searching for your router model number.
Command Prompt itself cannot retrieve the router admin password because that credential is stored on the router's internal memory, not on your computer. The Wi-Fi password retrieval method described above works only because your computer has a copy of it saved locally.
What to do if you've changed the password and forgotten it
If you changed your router's admin password after setup and no longer remember it, the only way to regain access is to reset the router to its factory default settings. Locate the small reset button on the router — it's usually recessed into the case so you can't press it accidentally. Use a straightened paperclip or a thin tool to press and hold the reset button for 10 to 15 seconds while the router is powered on. The lights on the router will flash or go dark, indicating the reset is in progress.
Once the reset completes, the router will restart with its default username and password restored. You can now log in using the credentials from the physical label. After logging in, you should when ready change the password to something you'll remember, and also set a new Wi-Fi network name and password if you want to change those from the defaults.
Be aware that resetting the router will erase any custom settings you've configured, including port forwarding rules, static IP assignments, or custom DNS servers. You'll need to reconfigure these manually after the reset.
Accessing the router's web interface once you have credentials
Open any web browser and type your router's IP address into the address bar — typically 192.168.1.1 or 192.168.0.1. Press Enter. A login page should appear asking for a username and password. Enter the credentials from the router's label or the ones you set up during initial configuration.
Once logged in, you'll see the router's admin panel, where you can change your Wi-Fi password, update security settings, restart the router, or adjust other network configurations. The layout and options vary by manufacturer and model, but most routers group Wi-Fi settings under a "Wireless" or "Network" tab.
Why Command Prompt shows your Wi-Fi password in plain text
Windows stores Wi-Fi passwords locally so your computer can reconnect to networks automatically without asking you to type the password each time. This stored copy is encrypted on your hard drive, but the netsh command with the key=clear parameter decrypts and displays it. This is by design — it allows you to recover a password you've forgotten, but it also means anyone with administrator access to your computer can retrieve all your saved Wi-Fi passwords.
If you're concerned about security, you can remove a saved network profile from Command Prompt by running netsh wlan delete profile name="YourNetworkName". This removes the stored password, and your computer will ask for the password the next time it tries to connect to that network.
Frequently Asked Questions
Can I use Command Prompt to find passwords for networks I've never connected to?
No. Command Prompt can only display passwords for networks your computer has previously connected to and saved. If you need the password for a network you've never joined, you'll need to contact the network owner or access the router's admin panel if it's your own device.
What if the netsh command returns "No profiles found"?
This means your computer has no saved Wi-Fi profiles, or your wireless adapter is not recognized. Make sure you're running Command Prompt as administrator and that your wireless network adapter is enabled in Device Manager. If you've never connected to a network before, there will be nothing to retrieve.
Is it safe to display my Wi-Fi password in Command Prompt?
It's safe if you're the only person with access to your computer. However, anyone sitting at your keyboard or with remote access to your machine can run this command and see all your saved passwords. Don't run this command on a shared or public computer.
Will resetting my router delete my internet connection?
Temporarily, yes. During the reset, your router will restart and lose all custom settings. You'll need to reconnect to the Wi-Fi using the default network name and password from the router's label, then reconfigure any custom settings you had before the reset.
What if my router doesn't have a reset button?
Some older or specialized routers may not have a physical reset button. Check your router's manual for alternative reset methods, which might include holding down a power button for a specific duration or accessing a reset option through the admin panel itself if you can still log in.