It’s a long story, but … is there a way to get the Wi-Fi password for a network I was connected to at one time, but am not connected to right now?
Actually, yes there is.
Unless you explicitly tell it to forget, Windows will carefully remember all the passwords for all the wireless networks you’ve connected to in the past.1
The only “trick” is that we’ll be using Command Prompt to get Windows to show us that password.
Become a Patron of Ask Leo! and go ad-free!
Command Prompt (Admin)
Our work starts by running Command Prompt with Administrator privileges.
In Windows 10, that means right-clicking on the Start button and clicking on Command Prompt (Admin).
In other versions of Windows, you can locate Command Prompt in the Start menu, usually in All Programs, and then click on “Run as Administrator”.
The program we’ll use is “netsh” – short for Network Shell. It’s a multi-purpose program that performs a number of network-related tasks.
Type the following command into Command Prompt (followed by Enter):
netsh wlan show profile
This lists all the wireless profiles Windows has remembered, with their network name, or SSID. Use that to identify which network you’re interested in.
For my example, I’ll use the network with the SSID “askleo.com/hotspot”2, but you would use the SSID for which you want to retrieve the password.
Type the following into Command Prompt:
netsh wlan show profile "askleo.com/hotspot" key=clear
This will display a lot of information about that specific wireless connection.
Underneath “Security settings”, listed as the “Key Content”, will be the Wi-Fi password you’re looking for.
Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.
I'll see you there!
Download (right-click, Save-As) (Duration: 3:21 — 3.1MB)
32 comments on “How Do I Recover a Wi-Fi Password When I’m Not Connected?”
Cool. The command prompt type is small for these old eyes. Tried ctrl up arrow and control scroll with mousewheel. Is it adjustable?
Yes, but it’s not as simple as it is in a windows program. You’d need to go into the command prompt’s system menu (the menu at the top left icon), properties, and select a larger font.
Wow, I learned something that’ll reduce my eyestrain!
I was told that the “Wireless Autoconfig Service” (wlansvc) is not running. So, I didn’t get the SSID display.
Same here, but I know why : I’ve explicitly disabled that service as my computer don’t have any wireless capability, connect via ethernet cable only.
Services can have 3 states : Automatic, manual and disabled.
Automatic will start as Windows start.
Manual will start only if needed by some process.
Disabled will never start.
If the service is set to automatic but stopped, or manual, the command should start it, so, it must be set as disabled.
As the service is not running, it can’t return any information, it also can’t store any information. It also mean that you just can’t connect wirelessly automatically. You need to enter the password each time you want to connect.
Failed to get screen shot, but there was no password / content on either my main network nor my extender. ??
In Windows 7 (well it works for me…) even if you’re not connected to a particular network you can go to “Manage wireless networks” from Network and Sharing Center, right click properties on one of your saved networks and then click the Security tab. Tick the “Show characters” box and there’s the password. You probably need to be in an admin account, or have run that application with admin privs turned on, but all of that seems a bit easier than the Command prompt stuff.
Maybe that method has been removed in Windows 8 and 10?
It is still in Windows 8 and 10 when you are connected to a wireless network, but I have not found it when not connected. Many ways to get there but I use: Windows key + X, Network Connections, Right-click your wireless connection, Status, Wireless Properties, Security tab, check the box “Show characters”.
This works for only the one you”re connected to. Leo’s command prompt method will bring up a list of all you connected to before. I was just able to check my Work password although I’m on my Home network at the moment.
Following the instructions using Windows 10 ends up showing a Security Key line, but no Key Content line immediately below it as appears in your explanation. I do have a wireless password, but evidently it does not appear as you have described.
It’s funny. I one school where I teach, the students aren’t given the password to the WiFi, the secretary logs in for them on their computers the first time and the passwords are saved. Moral dilemma: should I teach them this? ;-)
Yes, I already did.
I have tried this procedure and I am amazed because although I never took my laptop out of my house it has produced a list with passwords of pretty distant wireless networks, that I only have in my mobile and that I have never manually introduced in my laptop. Although my laptop has not listed all of the passports included in my mobile, am I to assume that my mobile is “leaking” information to my laptop?
I have read all the above but found no help. I am trying to open up my wifi connection. I know the Hub , it’s BTHub3-M9G4 but I,m nt sure of the password. How canI get it
You have to have connected once in order to “recover” the password – which is what this article is about.
There’s no way to know the password of a wireless hotspot – that’s kinda the point of the security of it all. You’ll either need to contact whomever set it up, or configure the hotspot yourself with a password you select.
Thank you very much for this article! I learned something new and it helps when you forgot to keep a memo of your wifi password.
I was able to retrieve my password. Thanks.
Thanks for posting Leo, just what I was looking for :)
I once used the network but I got disconnected Now I don’t know how to find a saved password in my laptop I tried command prompt with netsh wlan but it failed
Read the article you are commenting on. It has all your option.
Failed how? Did you run as administrator?
before all that…i already clicked forget on the network name so when I follow your steps it doesn’t show any password next to key content…what can I do?
How can I recover my Wi-Fi password, if I’m not connected to it and haven’t at all (The pc I’m on now is new).
I tried the tutorial that was used but it said ” User Profiles “
If you’ve never connected, there are a couple of possibilities.
1. Many routers have a connect button sometimes called the WPS button. Pressing that while trying to connect will get you into the network and save the password on your computer which can be recovered via the instructions in this article you are commenting on.
2. I believe all routers have a reset button which resets the password to the default which is usually printed on the router. (Don’t try this without the owner’s permission.)
3. Ask the owner or someone who has connected to that network :-)
So, I tried this however the ‘Key Content’ didn’t come up. It just said ‘Security key : present’ or whatever. Does this mean I am unable to access it? Am I doing something wrong?
If you followed the instructions then I’m not sure what’s up. It’s possible your network is using a different kind of encryption key, I might guess.
My Windows was reinstalled so it does not remember my password :( Any other suggestion. I got home and I do remember my password and have it written but it does not work.
Only thing I can suggest is using a different device that can connect to the network. Otherwise you’ll have to contact the Wi-Fi owner for the password, or reset the Wi-Fi password at the access point to something you know.
I just ran “netsh wlan show profile” in Power Shell and a lot of WiFi logins showed up for places that I never visited with this computer. I had visited with other computers. Is it possible that they were put there by LastPass which remembers WiFi passwords? I would have thought that LastPass would only place them in your saved networks after visiting that hotspot with that computer.
I believe either (or both?) your Google account and Microsoft account may sync Wi-Fi passwords.
I consider that a good thing, but it’s something that might freak conspiracy theorists out.
I found the password and put it in, but it’s still saying the network security key isn’t correct.
Thank you! Worked on Windows 10. Needed to remember password to a network I wasn’t connected to. Windows Help said it can’t be done. Good thing I found Ask Leo!