Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

How Do I Recover a Wi-Fi Password When I’m Not Connected?

In a previous article you showed how to get the Wi-Fi password being used to connect to a wireless network. The only catch is that you had to be connected to the network to get the password.

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).

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”.

Netsh

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

netsh wlan show profiles

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.

Wireless Security Key

Underneath “Security settings”, listed as the “Key Content”, will be the Wi-Fi password you’re looking for.

If you found this article helpful, I'm sure you'll also love Confident Computing! My weekly email newsletter is full of articles that help you solve problems, stay safe, and give you more confidence with technology. Subscribe now and I'll see you there soon,

Leo

Podcast audio

Play

Footnotes & references

1: I assume there may be a limit, but if there is, I’ll also assume it’s well beyond the number of networks most people connect to.

2: That’s the SSID of the hotspot created by my mobile phone when I need connectivity for my laptop. If you ever see it “in the wild”, look around – I might be nearby :-).

31 comments on “How Do I Recover a Wi-Fi Password When I’m Not Connected?”

  1. Cool. The command prompt type is small for these old eyes. Tried ctrl up arrow and control scroll with mousewheel. Is it adjustable?

    Reply
    • 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.

      Reply
  2. 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?

    Graham

    Reply
    • 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”.

      Reply
      • Claude,

        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.

        Reply
  3. 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.

    Reply
  4. 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.

    Reply
  5. 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?

    Reply
  6. 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

    Reply
    • 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.

      Reply
  7. 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

    Reply
  8. 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?

    Reply
  9. 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 “

    Reply
  10. 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?

    Reply
  11. 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.

    Reply
    • 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.

      Reply
  12. 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.

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.