This article was co-authored by wikiHow staff writer, Nicole Levine, MFA. Nicole Levine is a Technology Writer and Editor for wikiHow. She has more than 20 years of experience creating technical documentation and leading support teams at major web hosting and software companies. Nicole also holds an MFA in Creative Writing from Portland State University and teaches composition, fiction-writing, and zine-making at various institutions.
This article has been fact-checked, ensuring the accuracy of any cited facts and confirming the authority of its sources.
This article has been viewed 314,382 times.
Learn more...
If you need to find the Wi-Fi password for a past wireless connection, you can do so easily using the Windows command prompt or in your Network Settings. If you're using a Mac, you can find Wi-Fi passwords by entering a command into the terminal or checking the Keychain Access app. In this article, we'll walk you through the simple steps of finding the Wi-Fi password of a past connection using the command prompt (cmd), terminal, and more.
Find Wi-Fi Passwords in CMD: Quick Steps
- Press the Windows key and type "cmd".
- Right-click "Command Prompt" and select Run as administrator.
- Enter "netsh wlan show profiles" to find the name of the Wi-Fi network.
- Enter "netsh wlan show profiles (network-name) key=clear" to see the password for "network-name."
Steps
-
Open CMD with administrator permissions. Here's how:
- Press the Windows key on the keyboard or click the Start menu.
- Type cmd
- Right-click "Command Prompt" and select Run as administrator.
- Click Yes to confirm.
- Using this option requires being on the admin account on the device or at least having the admin password.
-
Type netsh wlan show profiles to get a list of networks. This displays a list of Wi-Fi networks this computer has connected to. Make note of the name of the network for which you want to find the password, as you'll need it in the next step.[1]Advertisement
-
Type netsh wlan show profile name="profilename" key=clear. Replace "profilename" with the name of the network you want to find the password for.[2]
- This command displays the network and security information for the Wi-Fi network, including the Wi-Fi password in plain text.
-
Find “Key Content" value under "Security settings." The value of "Key Content" is the Wi-Fi password for the selected Wi-Fi network.[3]
- If you want to see all the passwords for every Wi-Fi network you've connected to at once, enter this command at the prompt: for /f "skip=9 tokens=1,2 delims=:" %i in ('netsh wlan show profiles') do @echo %j | findstr -i -v echo | netsh wlan show profiles %j key=clear
-
Open Terminal. You will find Terminal on the Launchpad. You can also open it from Finder by going to Applications > Utilities > Terminal.[4] [[Image:Find the WiFi Password of a Past Connection Using Command Prompt (CMD) Step 6 Version 2.jpg|center]]
-
Type the command security find-generic-password -wa "Wi-Fi name". Replace"Wi-Fi name" with the name of the network you want to find the password for. Make sure to replace "your-wifi" with your WI name.[5]
- If you don't know the name of the Wi-Fi network, use the command security find-generic-password -D "AirPort network password" -a "" 2>/dev/null to display past connections.
-
Enter your password when prompted. Once you confirm your password, you will see the password for the selected Wi-Fi network next to "password."
Community Q&A
-
QuestionWhat if I get the message "key content is not available"?BakaOmiCommunity AnswerThat message usually appears if you aren't running CMD as an administrator. To run CMD as an administrator, right-click on it and select the option "Run as Administrator" (type in the admin password if it asks for one), and voila. Now retype the netsh command and you'll have the key content.
-
QuestionWhat do I do if it shows "present" as the security key?Ezekiel AkinyeluCommunity AnswerThe word present means the password is the current password of the WiFi. Just follow the instructions and you will get what you are looking for.
Tips
Warnings
- This usually only works for WPA, WPA2, and sometimes WEP Wi-Fi connections. Most WiFi is WPA2 or WPA3.[7]Thanks
References
- ↑ https://www.asus.com/me-en/support/faq/1046400/
- ↑ https://www.asus.com/me-en/support/faq/1046400/
- ↑ https://www.asus.com/me-en/support/faq/1046400/
- ↑ https://support.apple.com/guide/terminal/open-or-quit-terminal-apd5265185d-f365-44cb-8b09-71a064a42125/mac
- ↑ https://www.labnol.org/software/find-wi-fi-network-password/28949/
- ↑ https://www.tomsguide.com/computing/macos/how-to-view-wi-fi-passwords-on-mac
- ↑ https://support.apple.com/en-us/102766