How to Save Wi-Fi Passwords When Reinstalling Windows: 5 Proven Methods

Reinstalling Windows is a radical, but sometimes necessary, step to restore your computer's performance or resolve system issues. However, with a clean OS, users often lose all saved passwords. Wi-Fi networks, to which you've ever connected. Restoring them manually is a long and tedious procedure, especially when dealing with dozens of networks (home, work, cafes, hotels, etc.). Fortunately, Windows has built-in tools and third-party utilities that allow you to export all passwords in advance and import them after installing the new system.

In this article we will look at 5 working methods Saving Wi-Fi passwords - from standard commands netsh to automated programs like WirelessKeyViewYou'll learn how to extract passwords even from hidden networks, and why you shouldn't rely on cloud services like Google Account Sync, and what to do if some networks still won't connect after reinstalling Windows. And at the end, there's an FAQ with answers to the most frequently asked questions on this topic.

📊 How often do you reinstall Windows?
Once a year
Once every 2-3 years
Only in case of critical failures
Never reinstalled

1. Standard method: export passwords via the command line (netsh)

The most reliable and universal method is to use a utility netsh (Network Shell), built into Windows. It allows you to export all saved Wi-Fi profiles to a file. .xml, which can then be imported onto the new system. The advantage of this method is does not require administrator rights for export (import only) and works on all versions of Windows starting from Vista.

To save passwords, follow these steps:

  • 📋 Open command line as administrator (click Win + XTerminal (Administrator) or Command Prompt (Administrator)).
  • 💾 Enter the command to export all Wi-Fi profiles:
    netsh wlan export profile key=clear folder="C:\WiFi_Backup\"

    Here folder="C:\WiFi_Backup\" — the path to the folder where the files will be saved. You can specify any other path (for example, a flash drive).

  • 📁 Go to the specified folder - files with the extension will appear there .xml, each of which contains the network name and password in clear text (in the tag <keyMaterial>).

⚠️ Attention: Files .xml contain unencrypted passwords. Store them in a secure location and delete them after importing to the new system to prevent data leakage.

Make sure the command prompt is run as administrator|

Check free disk space (files take up ~1-2 KB each)|

Remember the path to the backup folder|

Make sure the folder name does not contain Cyrillic characters (this may cause errors)

-->

2. Alternative method: Manually view passwords in Windows Settings

If you only need to save the password from one or two networks, you can do without the command line. Windows allows you to view saved passwords in the system interface. This method is suitable for Windows 10 And Windows 11, but it has a limitation: you will only see the password for the network to which currently connected.

Instructions:

  1. Open Parameters (Win + I) → Network and InternetWi-Fi.
  2. Click Managing known networks.
  3. Select the desired network and click Properties.
  4. Scroll down to the block Network parameters and press View next to Network password.
  5. Enter your Windows account password (if prompted) and your Wi-Fi password will be displayed.

🔍 Nuance: If you're not connected to the network, its password won't be displayed. To work around this, temporarily connect to it or use the method with netsh.

3. Using third-party utilities: WirelessKeyView and WiFi Password Revealer

For those who prefer a graphical interface, there are specialized programs that automatically download all saved Wi-Fi passwords in a convenient format. The most popular:

  • 🔧 WirelessKeyView (from NirSoft) is a free portable utility that requires no installation. It displays all networks your PC has ever connected to, including hidden ones.SSID), and exports data to .txt or .html.
  • 🔑 WiFi Password Revealer — a similar program with Russian language support. It also displays the encryption type (WPA2-PSK, WEP and others).
  • 📊 Magical Jelly Bean WiFi Password Revealer — a simple utility with a minimalist interface, suitable for beginners.

📌 How to use WirelessKeyView:

  1. Download the program from NirSoft official website (check the file for viruses!).
  2. Launch WirelessKeyView.exe (no installation required).
  3. All networks with speakers will be displayed in the main window: Network Name (SSID), Password (Ascii), Key Type.
  4. To save the data, click File → Save All Items and select the format (Text File or HTML Report).

⚠️ Attention: Some antiviruses (for example, Avast or Kaspersky) can block utilities from NirSoft, considering them potentially dangerous. This is a false positive—add the program to the exceptions list or temporarily disable protection.

Why do antivirus programs complain about WirelessKeyView?

Utilities like WirelessKeyView read data from the Windows system registry, where passwords are stored. Antivirus software may detect this as suspicious activity, although the program doesn't actually make any changes to the system. NirSoft is a trusted developer with over 20 years of experience, but always download software only from the official website.

4. Export via Windows registry (for advanced users)

All Wi-Fi passwords are stored in Windows registry in encrypted form. They can be extracted manually, but this method requires caution—incorrect actions can lead to system failures. We recommend this only if other methods have failed.

Instructions:

  1. Open Registry Editor (Win + R → enter regeditEnter).
  2. Follow the path:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Wlansvc\Interfaces\{GUID}\

    Here {GUID} — unique identifier of the network adapter (there may be several folders).

  3. In each folder {GUID} find a subsection Profiles — data about networks is stored there.
  4. Export the desired branch: right-click → Export → save the file .reg.

🔐 Password decryption: In the file .reg The passwords are encrypted. To read them, you will need additional software like Mimikatz or online decoders (not recommended - risk of data leakage). It's easier to use netsh or WirelessKeyView.

5. Synchronization via Microsoft account (limited functionality)

Windows 10 and 11 offer the ability to sync some settings (including Wi-Fi passwords) via account MicrosoftHowever, this method works. not with all networks and depends on the OS versions. For example:

  • ✅ Works for networks connected after Windows 10 version 1803 updates.
  • ❌ Does not sync networks added manually via netsh or third-party utilities.
  • ⚠️ It may not work if you used it during reinstallation local account instead of Microsoft.

🔄 How to enable synchronization:

  1. Open ParametersAccountsSynchronization of parameters.
  2. Make sure the switch is on Synchronization of parameters included.
  3. Scroll down and turn on the option Passwords.

📌 Important: Even if synchronization is enabled, networks may not reconnect automatically after reinstalling Windows. In this case, check:

  • Are you connected to the same account? Microsoft.
  • Is the system updated to the latest version (synchronization works more stable on Windows 11 22H2+).
  • Are there any conflicts with the antivirus (for example, Bitdefender may block synchronization).
What to do if syncing doesn't work?

If after reinstalling Windows, networks are not restored via a Microsoft account:

1. Make sure you are logged into the same account (email must match).

2. Open Settings → Network & Internet → Wi-Fi → Manage known networks - sometimes networks are shown there, but do not connect automatically.

3. Try connecting to the network manually by entering the password from the backup (if you have one).

6. Recovering passwords after reinstalling Windows

You have successfully saved your passwords - now you need to import them to the new systemThe method depends on which method you used for export:

Export method How to import Notes
netsh (XML files) Double click on each one .xml-file or use the command:
netsh wlan add profile filename="C:\WiFi_Backup\NetworkName.xml"
Administrator rights are required. Some networks may not be added if the tag is missing in the XML. <keyMaterial>.
WirelessKeyView (TXT/HTML) Manually copy the passwords from the file and connect to the networks through the Windows interface. Automatic import is not possible - manual input only.
Microsoft Sync Sign in to the same Microsoft account and wait for automatic syncing (may take up to 10 minutes). Doesn't work with all networks. If you experience any issues, check your sync settings.
Registry (REG file) Double click on .reg-file and confirm the import. Risky - may lead to conflicts if the registry structure has changed.

⚠️ Attention: If some networks do not connect after importing, check:

  • 🔄 Security type: Make sure that the encryption type has not been changed in the router settings (for example, from WPA2-PSK on WPA3).
  • 📡 MAC filtering: If the router has binding enabled MAC address, add a new network card address.
  • 🔄 Wi-Fi channel: On some routers (for example, TP-Link or ASUS) after changing the channel, old connections may be reset.

Common problems and their solutions

Even with proper password backup, users still encounter difficulties. Let's look at typical scenarios and how to solve them:

🔴 Problem: After importing XML files, networks do not appear in the list

Cause: The file is missing critical information (for example, a tag <name> or <MSM>).

Solution: Open the XML file in Notepad and check its structure. A correct file should contain:

<WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">

<name>NetworkName</name>

<MSM>

<security>

<authEncryption>

<authentication>WPA2PSK</authentication>

<encryption>AES</encryption>

<useOneX>false</useOneX>

</authEncryption>

<sharedKey>

<keyType>passPhrase</keyType>

<protected>false</protected>

<keyMaterial>YourPasswordHere</keyMaterial>

</sharedKey>

</security>

</MSM>

</WLANProfile>

🔴 Problem: Password in XML file appears empty or encrypted

Cause: When exporting via netsh parameter was not specified key=clear.

Solution: Repeat the export with the correct command:

netsh wlan export profile key=clear folder="C:\WiFi_Backup\"

Without key=clear passwords will be masked (for example, ).

🔴 Problem: After reinstalling Windows, some networks connect, but others don't.

Reasons and solutions:

  • 🔄 The password on the router has changed: Connect to the network through another device (for example, a phone) and update the password in the backup.
  • 📡 Hidden network (SSID is not broadcast): When importing via netsh add parameter ssid="NetworkName" ssidHex="..." into an XML file.
  • 🛡️ Firewall is blocking the connection: Temporarily disable Windows Defender or a third-party antivirus.

FAQ: Answers to Frequently Asked Questions

❓ Is it possible to save Wi-Fi passwords without administrator rights?

Yes, but with restrictions:

  • Through netsh you can export passwords without admin rights, but for import they will be needed.
  • Utilities like WirelessKeyView They also work without admin rights, but may not show all networks.

If you don't have administrator rights on your current PC, try running the command prompt under a different account with the required rights.

❓ Will saved passwords work if I change my Wi-Fi adapter?

Yes, passwords are linked to network profile, and not to the hardware adapter. However:

  • If the new adapter does not support the Wi-Fi standard used by the network (for example, 802.11ac instead of 802.11n), connection problems may occur.
  • On some laptops (eg. Dell Latitude or Lenovo ThinkPad) Manufacturers install their own Wi-Fi drivers, which may conflict with standard profiles.

In such cases it can help manual connection to the network by entering the password from the backup.

❓ Is it possible to transfer Wi-Fi passwords from Windows to Mac or Linux?

There is no direct way, but there are workarounds:

  1. For Mac: Use passwords from a backup (XML or TXT) and enter them manually in System Preferences → Network → Wi-Fi.
  2. For Linux: Edit the file /etc/NetworkManager/system-connections/NetworkName.nmconnection, adding a line psk=your_password.

⚠️ Attention: Password storage formats are incompatible across different operating systems. Automatic import (both via netsh on Windows) is not possible.

❓ What should I do if I forgot to save passwords and Windows has already been reinstalled?

If you have access to your old hard drive (HDD/SSD), you can try extracting passwords from a backup:

  1. Connect the old drive as external storage to a new PC.
  2. Go to the folder C:\ProgramData\Microsoft\Wlansvc\Profiles\Interfaces on the old disk.
  3. Copy files with the extension .xml and import them through netsh.

If the disk is formatted, use data recovery programs (for example, Recuva or EaseUS Data Recovery), but the chances of finding XML files are minimal.

❓ Is it safe to store Wi-Fi passwords in the cloud (Google Drive, Yandex Disk)?

Store passwords in the cloud it is possible, but with caution:

  • Safely: If the files are archived with a password (for example, in .zip with encryption AES-256) or encrypted using VeraCrypt.
  • Dangerous: Storing open XML or TXT files with passwords poses a data leak risk, especially if the cloud is hacked.

🔐 Recommendation: Use password managers (KeePass, 1Password) or encrypted containers for storing backups.