How to Find the Wi-Fi Security Code on a Laptop: A Complete Guide

Many users are familiar with the situation of needing to connect a new device to their home network, but the password has long been forgotten and is not written down. Fortunately, modern computer operating systems have built-in functionality that allows you to recover forgotten data without complex manipulations. In most cases, security code is securely stored in the device's memory if the laptop has ever successfully connected to this access point.

There are several proven methods for extracting this information, ranging from the Windows graphical interface to the command line for more advanced users. The method you choose depends on your operating system version, whether you have administrator rights, and whether you're currently connected to the network. Below, we'll detail the most effective options.

Don't panic if the standard methods don't work, as you can always log into the router's administrative panel. This is a universal method that works regardless of the device you're using to access the settings. The key is to proceed consistently and pay close attention to the commands you enter.

Using the Windows graphical interface

The easiest and most accessible method for most users is to access the standard network settings through the control panel. This method doesn't require any special commands and is suitable even for beginners who are new to this task. You will need to have user access to the system, as viewing security settings often requires confirmation.

First, you need to open the list of available connections. In Windows 10 and 11, you can do this by right-clicking the Wi-Fi icon in the system tray (lower-right corner of the screen) and selecting Open Network & Internet Settings. Next you should go to Network and Sharing Center, where the active connection is displayed.

Find the name of your wireless network and click on it. A status window will open, where you need to click the button Wireless network propertiesIn the dialog box that opens, go to the tab SecurityThis is where the field is located. Network security key, which is hidden by asterisks by default.

To see the hidden code, just check the box next to the item Show entered charactersThe system may prompt you to confirm administrator rights, after which the password will become visible in plain text. You can copy or rewrite it for use on other devices.

⚠️ Note: If the "Show entered characters" option is grayed out, this means that your account does not have sufficient rights or the system security policy blocks viewing saved keys.
📊 Which operating system do you use most often?
Windows 10
Windows 11
macOS
Linux
Other OS

Viewing a password via the CMD command line

For users who prefer faster methods or are limited by the graphical interface, the command line is the ideal solution. This method allows access to saved profiles of all networks the laptop has ever connected to, even if the connection is currently inactive.

The first step is to launch the Command Prompt as an administrator. To do this, press the key combination Win + X and select Windows PowerShell (Administrator) or find cmd In the search box, right-click and select the appropriate option. In the window that opens, enter the command to display a list of all saved profiles:

netsh wlan show profiles

Find your network name in the list. If the network name contains spaces, be sure to enclose it in quotation marks. Next, enter the command to display detailed profile information, adding the key key=clear, which is responsible for revealing the security key:

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

After running the command, scroll down to the section Security parameters. In the line Key content The password you're searching for will be displayed in clear text. This method is especially useful when you need to quickly find the security code without having to navigate through menus.

What to do if the command fails?

If the system returns an "Access Denied" error, make sure you launched the command prompt as an administrator. Also, check the spelling of the network name, including capitalization and spaces. In rare cases, antivirus software may block network commands.

Finding a Security Key on macOS

Apple MacBook owners need to proceed differently, as macOS has a different architecture than Windows. All passwords are stored in a special secure database called Bunch of keysIt is a centralized repository of passwords, certificates, and encryption keys.

To access the information, open Finder, go to the section Programs -> Utilities and launch the application Bunch of keysYou can also use Spotlight search (Cmd + Space) to type the program name. Select a category in the left column. Passwords, and then find the name of your Wi-Fi network in the list on the right.

Double-click the network name to open its properties. In the window that opens, check the box. Show passwordThe system will require you to verify your identity: you'll need to enter your macOS user account password or use Touch ID for authorization. Once verified, your password will appear in the text field.

An alternative method for the latest versions of macOS (Ventura and later) allows you to view your password directly in Settings. Go to System Preferences -> Wi-Fi, find the desired network in the list of known networks and click the information icon or the three dots next to its name. After authentication, you'll see a field with a security key.

Receiving data via the router's web interface

If none of the methods on the laptop itself help (for example, the network card drivers are damaged or the system has been reinstalled), the most reliable method remains: accessing the router settings. To do this, the laptop must be connected to the router, preferably via LAN cable, but a Wi-Fi connection will also work if you have one.

Open any browser and enter the router's IP address in the address bar. The most common addresses are 192.168.0.1, 192.168.1.1 or 192.168.31.1The exact address, as well as the login and password, are usually located on a sticker on the bottom of the device. If the default data has been changed, you will need to remember it or perform a factory reset.

After logging into the control panel, find the section responsible for the wireless network. It may be called Wireless, Wi-Fi, Wireless mode or WLAN. Within this section, look for the subsection Security (Security) or Wireless network settingsThat's where the field is located. WPA-PSK Key or Wireless network password, where the current access code is indicated.

Here you can not only find out your password, but also change it to a more complex one if you suspect someone has connected to your network. Don't forget to save your changes by clicking Save or Apply, after which all devices will require reconnection with a new password.

Router brand Standard IP Default login Default password
TP-Link 192.168.0.1 admin admin
ASUS 192.168.1.1 admin admin
D-Link 192.168.0.1 admin (empty field)
Keenetic 192.168.1.1 admin 1234
⚠️ Please note: Router interfaces are constantly being updated. Menu locations and item names may vary depending on the firmware version. If you can't find the section you need, please refer to the official documentation from the manufacturer of your model.

☑️ Check before logging into the router

Completed: 0 / 4

Using third-party utilities and PowerShell

To automate the process or obtain information in a more convenient format, you can use PowerShell or specialized software. PowerShell provides more flexible tools for working with network adapters than the classic CMD.

Run PowerShell as administrator and use the following script to display all profiles and their passwords in a readable format. This method is convenient because it immediately displays a list of all networks:

netsh wlan show profile name="*" key=clear | Select-String "Key Content"

However, there are also graphical utilities such as WirelessKeyView from NirSoft. This small program scans the Windows registry and displays a table listing all saved networks and passwords. The program doesn't require installation, but antivirus software may detect it as a data-stealing tool, as its operating principles are similar to those of hackers.

Using third-party software is justified in cases where standard Windows tools fail or the system registry is damaged. However, always download such tools only from the developers' official websites to avoid infecting your computer with malware.

Restoring access in case of complete data loss

There are situations when the password isn't saved on any device, access to the router is blocked, and standard methods don't work. In this case, a radical yet effective solution remains: resetting the router to factory settings. This will return all settings, including the network name and password, to the original values ​​indicated on the sticker.

To perform a reset, find the button on the router body. Reset (It's often recessed into the case.) Press it with a paperclip or toothpick and hold for about 10-15 seconds until the lights flash simultaneously. After rebooting, you'll be able to connect using the information on the label on the bottom of the device.

After connecting, be sure to access your router settings and set a new, unique password, as factory-set combinations are easily brute-forced. We also recommend updating your device's firmware to fix any security vulnerabilities.

Regularly backing up your router settings will help prevent similar problems in the future. Many modern models allow you to save the configuration to a file that can be quickly restored after a reset.

Is it possible to find out the Wi-Fi password if the laptop has never connected to this network?

No, this can't be done using the laptop's software. If the device never received the security key, it simply won't be in its memory. The only options are to obtain it from the network owner, look at the router's sticker (if the password hasn't been changed), or access the router's settings from another connected device.

Why is the Network Security Key field blank or hidden?

This is a standard operating system security measure. Data is encrypted and hidden from casual viewing. Viewing it always requires administrator permissions or logging in with the appropriate privileges. On some corporate networks, viewing may be blocked by group policies.

Are password recovery programs safe to use?

Using trusted programs from reputable developers (such as NirSoft) is relatively safe if they are downloaded from the official website. However, many antivirus programs classify them as "RiskWare" or "HackTools" because they extract sensitive data. Always scan files with an antivirus before running them.

What should I do if I forgot my router admin password?

If the default login and password (admin/admin) aren't working and were previously changed, and you don't remember them, a full reset of the device to factory settings will help. This will restore access to the control panel, but will require reconfiguring the internet and Wi-Fi.

Where is the password physically located on the router?

On most modern devices, the factory password (WPS PIN or Wireless Key) is printed on an information sticker located on the bottom or back panel of the device. Look for the "WPA Key," "Wireless Password," or "Wi-Fi Password" fields.