Networking

What Is a Network Key? The Wi-Fi Network Security Key Explained

A network key, formally the network security key, is the password you enter to join a Wi-Fi network. It is a shared secret that proves you are allowed on the network and is used to encrypt the traffic between your device and the router.

If Windows or another device asks you to "enter the network security key", it wants the Wi-Fi password. This article explains what the key does, how it differs from the network name, where to find yours, and how to read it on a Windows PC that is already connected. Command syntax comes from Microsoft's netsh wlan reference, and any output shown is example output.

What is a network key?

A Wi-Fi network has two pieces of identity. The first is the network name, called the SSID, which everyone nearby can see in the list of networks. The second is the network key, which only people who were given it should know. Joining the network means picking the name and then supplying the key.

The key does two jobs. It authenticates you, because a device that does not know it is refused. It also feeds the encryption that scrambles your traffic over the air, so someone listening nearby cannot read it. Which encryption is used depends on the security type configured on the router, such as WPA2 or WPA3. The Wi-Fi Alliance, the industry group that certifies Wi-Fi devices, says WPA3 is mandatory for Wi-Fi CERTIFIED devices and that WPA3-Personal gives increased protection against password guessing attempts.

Several names mean the same thing in everyday use:

  • Network security key, the wording Windows uses in its connection prompt.
  • Wi-Fi password or Wi-Fi key, the common names.
  • Passphrase or pre-shared key (PSK), the technical names for a key shared by everyone on the network. Microsoft's profile settings list WPA2PSK as one authentication type and describe the key as either a network key or a passphrase.
  • WEP key, the key of an older, weaker security type. Microsoft's reference still lists WEP, but you should not use it on a new network. If your router offers WPA2 or WPA3, pick one of those.

Network key vs SSID vs router password

People often mix these three up, and the mix-up causes most "wrong password" problems.

ItemWhat it isWho sees itUsed for
SSIDThe network nameAnyone in rangeChoosing which network to join
Network security keyThe Wi-Fi passwordPeople you share it withJoining the network and encrypting traffic
Router admin passwordLogin for the router's settings pageWhoever manages the routerChanging router settings

If you type the router admin password into the Wi-Fi prompt, the connection fails. The reverse also fails: the Wi-Fi key will not open the router's settings page unless someone set both to the same value, which is a bad idea.

Where to find your network security key

There are four usual places, from easiest to most work:

  1. The router label. Many routers have a sticker with the default network name and key. This only helps if nobody changed the key afterwards. Internet providers often print it on the device they supply, but the label location and wording vary by model.
  2. The router's admin page. Log in to the router's settings and open its wireless section. You can read the current key there and change it. The steps differ by manufacturer, so use your router's manual.
  3. A device that is already connected. Windows, and other systems, keep the key for networks they have joined. On Windows you can read it with the commands below.
  4. Whoever set the network up. At an office or a rented flat, the owner or administrator can tell you, or may be the only one allowed to.

How to see the network key on a Windows PC

Windows stores each network you have joined as a profile. To list them, open Command Prompt or PowerShell and run:

netsh wlan show profiles

Microsoft describes this command as listing all configured wireless network profiles. To export one profile with its key in plain text, open the prompt as administrator and run:

mkdir C:\WiFiProfiles
netsh wlan export profile name="HomeNetwork" folder="C:\WiFiProfiles" key=clear

Replace HomeNetwork with the profile name from the list. Microsoft's reference says that if key=clear is used and the caller is a local administrator, the XML file includes the key in plain text. Otherwise the key is encrypted in the output file. The folder must already exist and be local, because UNC paths are not supported. Each file is named "Interface Name-Profile Name.xml".

The key sits in the keyMaterial element. To print just that line:

findstr keyMaterial C:\WiFiProfiles\*.xml

Example output:

C:\WiFiProfiles\Wi-Fi-HomeNetwork.xml:  <keyMaterial>example-password-123</keyMaterial>

The exported file holds your password in readable text, so delete it when you are done. Our longer guide on seeing saved Wi-Fi networks and passwords on Windows covers listing, exporting and removing profiles step by step.

If a profile has no keyMaterial line, that is normal for an open network, where there is no key, and for work networks that use 802.1X sign-in, where each person has their own credentials.

What makes a good network key

The key is the only thing standing between your network and a neighbour with a laptop, so its strength matters. Microsoft's reference says the user security key for a hosted network should be a string of 8 to 63 ASCII characters, which is a useful guide to the usual limits of a passphrase. Within that range, longer is better. A long random string beats a short one with a substitution such as @ for a. Our article on password entropy explains why length matters more than clever substitutions, and the password generator can produce a random one in your browser.

Choose WPA3 if every device on the network supports it, or WPA2 if some do not. Avoid WEP and open networks for anything you care about. For the wider picture of how devices find and join a network, see how Wi-Fi works, and for the risks of networks that have no key, see whether public Wi-Fi is safe.

Changing or resetting the key

To change the key, log in to the router's admin page, open the wireless settings, enter a new passphrase and save. The router may restart its wireless radio. Every device that joined with the old key then fails to reconnect and asks for the new one. On a Windows PC you can also remove the stale profile with this command, then join again with the new key:

netsh wlan delete profile name="HomeNetwork"

Microsoft says the profile name can contain wildcard characters and that every profile matching the name is removed, so check the name before you run it. Deleting a profile only affects that computer. If you do not know the router admin password either, most routers have a physical reset button that restores factory settings, including the original key on the label. That also erases your other router settings, so treat it as a last resort.

If the key is rejected

  • Check the case and similar characters. Keys are case sensitive, and 0 and O or 1 and l are easy to confuse.
  • Check you picked the right network. Many routers broadcast separate 2.4 GHz and 5 GHz names, and neighbours often have similar names.
  • Remove the old profile. If the key was changed on the router, delete the saved profile and join again.
  • Confirm which password you have. The router admin password and the Wi-Fi key are different values.

Frequently asked questions

Is a network key the same as a Wi-Fi password?
In home and small-office networks, yes. The network security key is the passphrase you enter to join a Wi-Fi network, and many people call it the Wi-Fi password. Work networks that use 802.1X ask for a personal username and password instead of one shared key.
Is the network key the same as the router admin password?
No. The network key lets devices join the Wi-Fi network. The admin password protects the router's settings page. They are set separately, and a router can have different values for each.
How long can a network security key be?
Microsoft documents that a user security key for a hosted network should be a string of 8 to 63 ASCII characters. Other devices and routers may describe the limits differently, so check your router's own setup page.
Why doesn't Windows show a key for some networks?
Open networks have no key at all, and networks that sign you in with 802.1X store no shared key. In those cases there is nothing to display.
Can I change my network security key?
Yes, in the router's admin settings. Every device that was joined with the old key will then be asked for the new one, so update them all.

Sources