How to view the Wi-Fi code on a computer: all working methods

Forgot your home Wi-Fi password and there's no sticker with the code on your router? Or need to connect a new device but can't be bothered to look for the settings sheet? This situation is familiar to many people—especially if someone else set up the network years earlier. Luckily, You can find out your Wi-Fi password directly from your computer., if it's already connected to this network. There's no need to reset the router or call your ISP.

In this article - 5 proven methods for different operating systems: from standard tools Windows 10/11 to the command line and third-party utilities. Let's also consider the nuances for macOS And Linux, and at the same time, we'll learn how to export all saved networks to a text file. Important: these methods only work for networks to which the computer is connected. already connected at least once.

If your PC has never been connected to this network, you'll have to find the password on the router itself (usually found on a sticker on the bottom) or reset it to factory settings. But that's a topic for another article.

Method 1: Standard Windows settings (without programs)

The easiest method is to use built-in tools WindowsIt is suitable for Windows 10/11 and does not require administrator rights if your account has access to network settings.

Instructions:

  1. Click Win + Ito open Windows Settings.
  2. Go to the section Network and Internet → Wi-Fi.
  3. Click Managing known networks.
  4. Select the desired network and click Properties.
  5. Scroll down to the block Security parameters and check the box Show entered characters.

Done! The password will be displayed in the field. Network security keyIt can be copied or written down.

The PC is connected to the desired Wi-Fi network|The account has permission to view network settings|The router is not blocking access to settings (rare, but it happens)|The password is not hidden by domain policies (relevant for work PCs)-->

⚠️ Note: On some corporate laptops, access to Wi-Fi passwords may be blocked Group PolicyIn this case, try other methods or contact your network administrator.

Method 2: Command Prompt (universal for all Windows)

If the graphical interface is unavailable for some reason, help will come command lineThis method works even on older versions. Windows 7/8 and does not require installation of additional software.

Open Command line as administrator (click Win + X and select the appropriate item) and enter:

netsh wlan show profile name="NETWORK_NAME" key=clear

Replace NETWORK_NAME the name of your Wi-Fi network (case-sensitive!). For example:

netsh wlan show profile name="MyHomeWiFi_5G" key=clear

In the command results, find the line Key content — this is your password. If the network name contains spaces, enclose it in quotation marks.

Command parameter Description
netsh Network settings management utility
wlan Module for working with wireless networks
show profile Show network profile information
key=clear Display password in clear text
⚠️ Note: In some builds Windows (especially pirate) team netsh may be disabled or modified. If you see an error "The WLAN AutoConfig service is not running", check the service status in services.msc.

Method 3: PowerShell for Advanced Users

PowerShell — a more powerful tool than the command line, and it also allows you to extract Wi-Fi passwords. This method is useful if you need export all saved networks to a file.

Open PowerShell as administrator and run:

(netsh wlan show profiles) | Select-String "\:(.+)$" | %{$name=$_.Matches.Groups[1].Value.Trim(); $_=netsh wlan show profile name="$name" key=clear} | Select-String "Key contents\W+\:(.+)$" | %{$pass=$_.Matches.Groups[1].Value.Trim(); [PSCustomObject]@{PROFILE_NAME=$name;PASSWORD=$pass}} | Format-Table -AutoSize

This command will output a table with all networks and their passwords. To save the result to a file wifi_passwords.txt on your desktop, add to the end:

| Out-File "$env:USERPROFILE\Desktop\wifi_passwords.txt"
What to do if PowerShell complains about execution policies?

If you see an error "Scripting is disabled on this system.", run PowerShell as administrator and enter:

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

Then confirm the change by clicking Y.

This method is especially convenient for IT specialists, which configure multiple devices. For example, you can quickly migrate all Wi-Fi networks from one PC to another.

Method 4: View passwords on macOS

On computers Apple The process is a little different, but no less simple. You will need Keychain Access utility, which stores all system passwords.

Instructions for macOS Ventura and newer:

  1. Open Spotlight (Cmd + Space) and enter Bunch of keys.
  2. In the left column, select System.
  3. In the search bar, enter the name of your Wi-Fi network.
  4. Double-click on the found entry and check the box. Show password.
  5. Enter your account password Mac, if necessary.

The password will be displayed in the field. Show passwordIt can be copied or written down.

MacBook (M1/M2/M3)|MacBook (Intel)|iMac|Mac mini|Other-->

⚠️ Attention: On macOS Wi-Fi passwords are stored encrypted and linked to your account. If you reset your user password, you will lose access to old networks.

For older versions macOS (to Catalina) the path is a little different: you need to open Utilities → Keychain and search for a network in the category Passwords.

Method 5: Third-party programs for Windows

If standard methods do not work (for example, due to security policy restrictions), you can use specialized utilitiesThey not only show passwords, but also allow you to manage networks.

Top 3 proven programs:

  • 🔹 WirelessKeyView (from NirSoft) - free, portable, shows all saved Wi-Fi passwords. Download from the official website.
  • 🔹 WiFi Password Revealer - simple interface, export to .txt And .csv. Supports Windows 10/11.
  • 🔹 Magical Jelly Bean WiFi Password Revealer - shows besides passwords SSID, encryption type and signal strength.

Example of working with WirelessKeyView:

  1. Download the archive with the program and unzip it.
  2. Run the file WirelessKeyView.exe (admin rights are not required).
  3. Find the required network in the table - the password will be in the column Key (Ascii).
  4. Export data via if necessary File → Save All Items.

The advantage of such utilities is that they often reveal passwords even for networks to which the computer was connected a long time ago and which are no longer displayed in the standard settings.

How to view a Wi-Fi password on Linux

In distributions Linux (For example, Ubuntu, Fedora, Mint) Passwords are stored in configuration files. They can be read through the terminal.

Open terminal and run:

sudo grep psk= /etc/NetworkManager/system-connections/*

This command will list all saved networks with passwords in the format psk=YOUR_PASSWORD.

If you use Wicd instead of NetworkManager, the path will be different:

sudo cat /etc/wicd/wireless-settings.conf

For KDE Plasma (for example, in Kubuntu) passwords can be found in the file:

~/.kde4/share/apps/knetworkmanager/connections/
⚠️ Attention: In Linux permissions to view network settings are often required sudoWithout administrator rights you will get an error "Permission denied".

If your distribution uses a different network manager (e.g. connman V Debian), the path to the files may differ. Check your OS documentation for details.

Common problems and solutions

Sometimes the password isn't displayed or errors occur. Here are the most common cases and their solutions:

  • 🔌 The network is not displayed in the list of saved networks. → The computer didn't connect to it. Try connecting again or look for the password on the router.
  • 🔒 The password field is empty or grayed out. → The network may be using WPS or enterprise authentication (for example, in offices). In this case, the password is stored on the server, not on the PC.
  • 🛡️ Access denied (error 5 or "Access denied") → Run Command Prompt/Terminal as administrator (sudo For Linux/macOS).
  • 🖥️ There are no rights on the work PC → Contact your IT department - corporate networks are often managed centrally.

If you see the message "Unable to read this profile's data" V Windows, try:

  1. Disable your antivirus (sometimes it blocks access to network settings).
  2. Check the integrity of system files with the command sfc /scannow.
  3. Update your Wi-Fi adapter drivers via device Manager.

FAQ: Answers to frequently asked questions

Is it possible to find out the password for a Wi-Fi network that the computer has never connected to?

No, if the PC has never been connected to this network, standard methods won't reveal the password. Options:

  • Look at the router sticker (usually the factory password is indicated there).
  • Go to the router's web interface (usually at 192.168.0.1 or 192.168.1.1) and find the section Wireless Security.
  • Reset the router to factory settings (using the button) Reset on the body).

To hack other people's networks, there are utilities like Aircrack-ng, but their use illegally without the owner's permission.

Why doesn't the command line show the password, even though the network is in the list?

Possible reasons:

  • The network uses WPA3-Enterprise or 802.1X — the password is stored on the authentication server.
  • The network profile is corrupted (try deleting it and connecting again).
  • Domain security policies block access (relevant for work PCs).

Try using WirelessKeyView - sometimes it shows passwords where the command line is powerless.

How to transfer all Wi-Fi networks from one computer to another?

Methods:

  1. Via export to Windows: Use PowerShell-team from Method 3to save passwords to a file and then import them on another PC.
  2. Through WirelessKeyView: Export data to .reg-file and run it on the target computer.
  3. For macOS: Copy the file /Library/Keychains/System.keychain (but this may break the keychain!).

The most secure way is to manually connect the second PC to each network, entering the passwords from the first.

Is it possible to find out the Wi-Fi password from an Android phone or iPhone?

Yes, but the methods are different:

  • Android (with root rights): Use WiFi Password Viewer from Google Play or view the file /data/misc/wifi/WifiConfigStore.xml.
  • Android (without root): On some firmware (for example, MIUI on Xiaomi) The password can be seen in the router settings if the phone is connected to its network.
  • iPhone: There is no standard way. You can try iExplorer or iMazing to access keys (jailbreak required).

For more details, read our article "How to find out your Wi-Fi password from your phone".

Is it safe to use third-party password viewers?

Yes, if you download them only from the official websites of the developers (for example, NirSoft or Magical Jelly Bean). Risks:

  • Fake websites can distribute programs containing viruses.
  • Some utilities may send data about your networks to third parties (check reviews).
  • Antiviruses sometimes trigger false alarms on legitimate tools (for example, WirelessKeyView often detects as a "hacking tool").

Recommendations:

  • Before installation, check the file hash (for example, VirusTotal).
  • Use portable versions (no installation required).
  • After using, uninstall the program if you do not need it constantly.