
How to Export and Import All Your Saved Wi-Fi Passwords to a New Windows Computer
If you've had the same Windows computer for a few years, you've probably built up a small library of saved Wi-Fi passwords without ever noticing it. Your home network, a client's office, your in-laws' guest network, a vendor's lobby — Windows quietly remembers all of them so you never have to type a password twice.
The catch shows up the day you get a new computer. All of that quietly-saved convenience stays behind on the old one, and you're left either digging through router labels and old text messages, or standing in someone's office asking, "What's the Wi-Fi password again?"
The short version: Windows already has a built-in way to grab every saved Wi-Fi profile at once and hand them all to a new computer in one shot — no downloads, no third-party apps, nothing to install. The tool is called netsh, and it's been quietly built into Windows since 2000. Netsh isn’t limited to this task; it’s a Windows command-line utility for viewing, configuring, managing, and troubleshooting network components and server roles.
What You'll Need
Just the two Windows computers, a way to get a folder from one to the other such as a USB removable media, or a private cloud folder, or even a quick email to yourself all work fine — and about two minutes. For security sake, a transfer via a physical removable media (USB flash drive, external hard disk drive etc) is the best medium so your saved credentials are not exposed to the cloud in any shape or form.
Step 1: Export Every Saved Wi-Fi Profile From Your Old Computer
- Open the Run window. On your keyboard, press the Windows Key + R at the same time. A small box labeled "Run" will pop up in the bottom-left corner of your screen.
- Open the Command Prompt. In that text box, type cmd and hit Enter. A black window (the Command Prompt) will open.
- Paste the export command. Copy the exact line of text below, paste it directly into that black window, and press Enter:
mkdir "%USERPROFILE%\Desktop\WiFi-Profiles-Backup" 2>nul & netsh wlan export profile key=clear folder="%USERPROFILE%\Desktop\WiFi-Profiles-Backup"- Watch for the confirmations. You'll see one line per saved network, each ending in something like "is saved in file ... successfully." That's normal — it's not an error, it just means Windows is exporting one file per network it has stored.
What That Command Is Actually Doing (and Why It's Not Doing Anything Sketchy)
It looks like a lot packed into one line, so here's what each piece is responsible for:
- mkdir "%USERPROFILE%\Desktop\WiFi-Profiles-Backup" — creates a new folder named "WiFi-Profiles-Backup" right on the desktop of whichever account is currently logged in. %USERPROFILE% is a built-in Windows shortcut that always points to the current user's own folder, so this works correctly no matter what your Windows username actually is.
- 2>nul — a "quiet mode" flag. If you ever run this a second time and the folder already exists, mkdir would normally show a small message like "A subdirectory or file already exists." This just hides that message so it doesn't look alarming. It doesn't touch any files or settings.
- & — simply runs two commands back-to-back on one line, instead of typing them separately and pressing Enter twice.
- netsh wlan export profile — the part actually doing the work. netsh (short for "network shell") is a command that's been built into every version of Windows for more than two decades to manage network settings, and wlan export profile tells it specifically to save a copy of your saved wireless network profiles.
- key=clear — by default, Windows would export the file with the password scrambled so it can't be reused elsewhere. This tells netsh to include the actual password in plain, readable text instead — which is the whole reason this works for moving networks to a new computer, and exactly why the caution above matters.
- folder="%USERPROFILE%\Desktop\WiFi-Profiles-Backup" — tells netsh exactly where to save all of the exported files: the folder created a moment earlier in the same line.
None of this reaches out to the internet, installs anything, or changes any of your existing network settings. It only reads what Windows already had saved and writes a copy of it to a folder you can see and control.
Once it finishes, open the new WiFi-Profiles-Backup folder on your Desktop. You'll see one XML file per network, named to match — with "Wi-Fi-" added to the front and ".xml" added to the end automatically. So a network called "Office Private Network" would show up as a file named Wi-Fi-Office Private Network.xml
Getting the Backup Folder to Your New Computer
Copy the whole WiFi-Profiles-Backup folder over using whatever's easiest — a USB flash drive, a private cloud folder, an external drive. Since the files contain readable passwords, it's worth avoiding anything public or shared, like a drive other people at the office can browse.
Step 2: Import All the Profiles on the New Computer
- This is very important - copy the "WiFi-Profiles-Backup" folder from wherever you are bringing it from, directly to the desktop of the new computer. The import command only looks at your desktop to locate the backup folder to import.
- Open the Run window the same way by hitting the Windows Key + R together, then type cmd and hit Enter to open Command Prompt.
- Copy and paste the import command below to the command prompt window and press enter.
for %f in ("%USERPROFILE%\Desktop\WiFi-Profiles-Backup\*.xml") do netsh wlan add profile filename="%f" user=all- Just like before, you'll see a confirmation line for each network as it's added back in. And that's all!
What That Command Is Actually Doing
- for %f in (...) do ... — has Command Prompt loop through a whole list of files automatically, instead of you typing one line per network by hand. %f is just a temporary placeholder name that Command Prompt fills in with each file it finds as it goes.
- "%USERPROFILE%\Desktop\WiFi-Profiles-Backup\*.xml" — tells that loop to look inside the backup folder for every file ending in .xml and the asterisk (*) means "anything," so it matches every single exported Wi-Fi profile regardless of what the network is named.
- netsh wlan add profile — the counterpart to the export command from Step 1. It tells Windows to read one of these XML files and add it as a saved wireless network.
- filename="%f" — plugs in whichever file the loop is currently working on.
- user=all — makes the network available to every account on that computer, not just whichever one happens to be logged in when the command runs. Handy on a shared or family computer.
Because it's a loop, this one line reads and re-adds every XML file in the folder in a single pass — so however many networks accumulated on the old computer over the years, that's how all of your Wi-Fi profiles come back to your new computer in just a few seconds.
One Important Limit: Enterprise Wi-Fi Doesn't Come Along as Easily
This method works with most home and small-office Wi-Fi networks, including WPA2 and WPA3 Personal networks with a shared password, open networks with no password, and even older WPA or WEP networks. Side note: WPA and WEP are obsolete and insecure, so any network still using them should be upgraded as soon as possible.
If your office uses enterprise Wi-Fi—typically 802.1X authentication through a RADIUS server, with individual usernames and passwords, client certificates, or smart cards—these steps may transfer the network’s configuration, but not the credentials or certificate private keys needed to connect. Those must be handled separately, usually by your IT administrator if you have one, or us. That’s beyond the scope of this two-minute guide, so if this sounds like your setup, it’s best to have someone assist you directly.
A Small Thing That Saves a Real Headache
This is one of those small technical annoyances that's genuinely worth two minutes of copy-pasting, especially if a new-computer refresh is already on your calendar. If you've got a whole office full of computers about to make that jump — or a Wi-Fi setup that could use a second look while you're at it — that's exactly the kind of thing we help with every day. Give us a call or drop us a line, no pressure, no sales pitch.
For Further Reading
- Servers, Networks, Wi-Fi & VPNs — how we plan and secure business wireless networks from the ground up.
- Why Your Business Needs Two WiFis (And How to Keep Both Safe) — the case for keeping guest and staff Wi-Fi on separate networks.
