Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • DSA
  • Practice Problems
  • Python
  • C
  • C++
  • Java
  • Courses
  • Machine Learning
  • DevOps
  • Web Development
  • System Design
  • Aptitude
  • Projects
Open In App
Next Article:
How to Reset MySQL Root Password in Windows Using CMD?
Next article icon

How to Find the Wi-Fi Password Using CMD in Windows

Last Updated : 07 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Forgotten your Wi-Fi password? Need to connect a new device but can’t recall the complex string of characters? You don’t have to scramble for that sticky note or reset your router just yet! Hidden within Windows is a powerful, built-in tool that lets you retrieve your Wi-Fi password quickly and securely—no third-party software required.

In this guide, we’ll show you how to use the Command Prompt (CMD) to reveal your saved Wi-Fi passwords in Windows 11 and 10 in a matter of seconds. This guide will help you whether you are troubleshooting connectivity issues, helping a friend connect to your network, or just curious about your security settings. This method is perfect for both tech enthusiasts and casual users. Say goodbye to password panic and hello to simplicity with this easy, command-line trick!

Why Retrieve Your Wi-Fi Password?

Following are the reasons to get your Wi-Fi password:

  • Connect New Devices Easily: Whether you have a smartphone, gaming console, or smart speaker, all devices which need a Wi-Fi password to connect to the internet. Instead of searching through old notes or rebooting your router, use Windows CMD or Settings to obtain stored passwords easily.
  • Share Your Network Securely with Guests:. When you’re sharing your Wi-Fi password with friends or family, it’s not safe to shout it across the room or write it on a piece of paper that anyone can see. Instead, you can find your password securely using CMD, then send it through a safe messaging app like WhatsApp, Signal, or Telegram. This keeps your network secure and protects your privacy.
  • Troubleshoot Without Resetting Your Router: Don’t reset the router (and lose all your settings!) yet! Try first to determine if the problem is a typographical error in the password. Utilize Windows own tools to verify your stored password and avoid unnecessary downtime.
  • Audit Passwords for Stronger Security: Users tend to use default or weak passwords like “12345678” for years, leaving their network vulnerable.

Methods to Find Wi-Fi Password Using Windows

There are mainly two methods to find out the wifi passwords in Windows systems. Here in this section, we have mentioned both of the methods, one using Windows CMD and the other using Windows settings. Now, go through methods to know which one is better for you.

Method 1: Find Wi-Fi Password Via the Command Prompt (CMD)

We can see your forgotten Wi-Fi password by running a couple of quick ‘netsh’ commands using Windows Command Prompt.

Step 1: Open CMD

  • Press start and type CMD, right-click on the Command Prompt option shown as a search result; and click on Run as administrator.  

Step 2: Type WLAN Command

  • Type the following command and press Enter to show a list of network names that we connect to.
netsh wlan show profile 

This command list of all wireless network profiles saved on the computer, including their names and settings as shown below. Select the Wi-Fi you want to know its password. Let’s suppose we want to see the password for the Wi-Fi Name “Gravity”.

Gravity

Wi-Password via CMD

Step 3: Enter Show Profile Command

  • Now, type the following command and again press enter
netsh wlan show profile name= "Wi-Fi name" key=clear
  • This command displays detailed information about that Wi-Fi, including the Profile information, Connectivity settings, Security settings and Cost settings for the specified Wi-Fi network profile.
Wi-Fi-password-via-CMD

Using CMD

Step 4: Find Key Content Option

  • Scroll through the results until we find an entry named Key Content & our Wi-Fi password will be listed next to it.
Wi-Fi-password-via-CMD---02

Wi-Fi password via CMD

As now we have our Wi-Fi password, you can connect our device to the network to complete our work. 

Method 2: Easy Method to Find Wi-Fi Password Via Network & Internet settings

Step 1: Open Network Settings

  • Connect to the Wi-Fi that you want to know the password, then right-click the [Network] icon on the taskbar and select [Network and Internet settings].
Check-the-Wi-Fi-password

Check Wi-Fi Password

Step 2: Choose Advance Settings

Select [Advanced network settings].

Network-Internet-settings_2

Network & Internet

Step 3: Choose Related Settings

Under Related settings, select [More network adapter options].

via-Network-and-Internet-settings_2

Network and Internet Settings

Step 4: Select WiFi Option

  • Choose the connected Wi-Fi network, then select [View status of this connection].
-settings_4

Network Connection

Step 5: Select Wireless Properties

  • Select [Wireless Properties].
Wireless-Properties

Wireless Properties

Step 6: Click on Security Tab

  • On the [Security] tab of Wireless Network Properties, check the box [Show characters], you will see the Wi-Fi password in the Network security key field. 
Wireless-Properties02

Security

Here how they works

When you join a Wi-Fi network, Windows doesn’t just “remember” your password on a virtual sticky note. Instead, Windows uses secure security practices to securely save your password. Windows saves Wi-Fi passwords securely in an encrypted format within its registry. The netsh command decodes this data for networks you’ve joined, while the GUI technique retrieves the same information by means of the Network Configuration Manager. Both are secure and built-in with Windows, obliterating threat potentials from third-party utilities. This is what goes on in the background:

1. Where Does Windows Store Wi-Fi Passwords

Your Wi-Fi passwords are stored in a secure digital safe known as the Windows Registry. Consider the registry as a huge, well-organized file cabinet where Windows stores essential system information, such as network information.

  • Encryption: Passwords are kept in an encrypted format (scrambled code) so they can’t be read by hackers or malicious programs.
  • Access Restrictions: Only administrator accounts (such as you, the owner) can unlock and access these passwords.

2. How Do CMD and Network Settings Retrieve the Password?

Both the processes access the same encrypted information but in a different manner:

For CMD (Command Prompt):

  • The netsh wlan command acts like a master key that decrypts the password which was stored in the registry.
  • When you execute key=clear in command, Windows momentarily displays the password in plain text.

For Network Settings (GUI):

  • The graphical interface (Network & Internet settings) uses a utility which called Network Configuration Manager to retrieve the same encrypted password.
  • Unchecking the Show characters box encrypts your password in real time, much like how your phone displays hidden text when you enter a password.

3. Here how Encryption Works

Windows applies a method called DPAPI (Data Protection API) to encrypt your Wi-Fi password. Here’s a simple analogy:

  1. When you enter your password, Windows jumbles it into a secret code using a special key associated with your user account.
  2. To read it again, Windows employs that same key to decode the code which only occurs when YOU request it through CMD or Settings.

Conclusion

Finding your saved Wi-Fi password on a Windows system doesn’t have to be complicated. Whether you use Command Prompt (CMD) or the Network Settings GUI, Windows gives you easy and secure ways to retrieve forgotten Wi-Fi credentials. These methods are not only safe and native to the operating system, but they also work without needing any third-party tools or internet connection.

Using simple commands like netsh wlan show profile or navigating through the Network & Internet settings, you can recover your password in just a few clicks. These techniques are especially helpful for troubleshooting connectivity issues, connecting new devices, or simply verifying if your network password is strong and secure.



Next Article
How to Reset MySQL Root Password in Windows Using CMD?
author
probinsah
Improve
Article Tags :
  • How To
  • TechTips
  • Command Prompt
  • How To
  • Windows Hacks

Similar Reads

  • How to Find Connected WiFi Password in Windows?
    If you're connected to a WiFi network but can't remember the password, don't worry—Windows allows you to retrieve it easily. Whether you need to connect a new device or share the password with someone else, finding the connected WiFi password in Windows is a straightforward process. This guide will
    3 min read
  • How to Check Wi-Fi Password in Windows 10?
    If you miss the simplicity of the classic Windows Photo Viewer and want to restore Windows Photo Viewer in Windows 10, you're in the right place. While Windows 10 comes with a new default photo viewer, many users prefer the old version for its speed and ease of use. In this guide, we'll show you how
    3 min read
  • How to Reset MySQL Root Password in Windows Using CMD?
    Ever locked yourself out of your own database? It happens to the best of us! If you’ve forgotten your MySQL root password on a Windows machine, don’t panic. MySQL is a powerful database management system, and the root user has complete control over it meaning losing access can feel like a nightmare.
    4 min read
  • How to Change Windows Computer Password using CMD
    If you are a Windows user, one of the easiest ways to change your password is through the Command Prompt (CMD). This is especially helpful for users who prefer command-line tools or face issues accessing the standard settings menu. In this article, we’ll guide you through the steps to change your Wi
    4 min read
  • How to Merge/Hide One File into Another Using CMD in Windows?
    Merging or hiding files within other files using Command Prompt in Windows is a clever technique for managing and protecting your data. Whether you want to consolidate multiple files into one or conceal sensitive information, CMD offers powerful commands to achieve this seamlessly. Learning how to h
    3 min read
  • How to Show all the previously connected WiFi Networks using CMD in Windows?
    Wi-Fi(Wireless Fidelity) Launched in September 1997 is affiliated with WLAN (Wireless Local Area Network). It is a wireless communication technology that uses radio waves to provide a high-speed network and Internet connection. Sometimes there is a need to know the previously connected WiFi networks
    1 min read
  • How to Reset Windows Admin Password?
    If you forgot your Windows administrator password, you might be locked out of your computer and unable to access your files and settings. However, there are some ways to reset your password without losing your data or reinstalling Windows. In this article, we will show you how to reset your Windows
    5 min read
  • How to Check Open Ports Using CMD in Windows?
    Open ports on your Windows computer act like doors for data-letting information in and out. While necessary for apps and services, unprotected ports can become security risks. Checking which ports are open helps you spot vulnerabilities, fix connection issues, and keep your system safe. Using Comman
    5 min read
  • How to use CMD for Python in Windows 10?
    Using the Command Prompt (CMD) is an effective way to interact with Python on your Windows 10 machine. Whether you're writing scripts, testing code, or running programs, mastering CMD for Python in Windows 10 is crucial. This article will guide you on how to run Python in CMD, execute scripts, and t
    4 min read
  • How to View Wi-Fi Password on iPhone Without QR Code?
    There are several methods you may use to get your iPhone's Wi-Fi password straight from the device if you want to examine it without scanning a QR code. This post will show you how to access the Wi-Fi password settings on your iPhone, whether you're seeking to discover the password for a network you
    5 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences