How to find a WiFi password using a QR code on a computer

Modern technologies allow you to exchange network connection data almost instantly using encrypted images. It's common to need to connect a new laptop or desktop computer to your wireless network, but you've forgotten the password or written it down in an inaccessible place. Smartphones running Android 10+ and iOS have long been able to generate QR codes for quickly connecting guests, but this feature isn't as straightforward on personal computers.

Direct scanning of a QR code with a laptop camera for instant password entry in Windows or macOS is not supported at the system level. This is due to the security architecture of these operating systems, where network key management is isolated to secure vaults. However, there is a proven algorithm that allows one to extract the hidden character combination using a smartphone as a reader and a PC as a target device.

In this article, we'll discuss why you can't simply scan a code from your phone's screen on your computer and offer working alternatives. You'll learn how to access your security key through your router settings or the command line if it was ever saved on one of your devices. Understanding these mechanisms will not only help you regain access but also better protect your home network from unauthorized access.

Why PCs can't scan WiFi QR codes directly

Many users mistakenly believe that if a phone can display a QR code for connection, then a laptop's webcam should be able to read it for authorization. In fact, operating systems Windows And macOS They don't have a built-in system module that would intercept the webcam feed, decode the connection string, and automatically enter credentials into the network adapter. This is done specifically to minimize attack vectors.

The QR code generated by the smartphone contains a format string WIFI:S:MyNetwork;T:WPA;P:MyPassword;;For a phone, this is a standard command that the OS recognizes as a connection trigger. A computer, however, simply views the image as an image unless special third-party software is running. Even with such software, there's no out-of-the-box auto-connection mechanism.

There is a fundamental difference in the approaches to security between mobile and desktop platforms. Mobile OSes are focused on convenient sharing within a trusted circle, while desktop systems have historically relied on more manual entry of configuration data by the administrator.

⚠️ Warning: Do not attempt to use dubious online services to "decode" screenshots of QR codes containing passwords. By uploading an image containing an access key to the cloud, you are effectively sharing your password with third parties.

📊 How do you usually connect new devices to WiFi?
I enter the password manually
I use a QR code from my phone
I use the WPS button
The password is already saved in the router.

Method of extracting password via Windows command line

If your computer has ever connected to the desired network, Windows stores its profile, including the password, in a secure vault. Even if you don't remember the key, you can retrieve it using standard system tools without installing additional software. This method is the most reliable and secure for PC users.

First, you need to open the command line interface with administrator rights. Press the key combination Win + X and select "Windows PowerShell (Admin)" or "Command Prompt (Admin)." In the window that opens, you'll first need to get a list of all saved profiles. Enter the command:

netsh wlan show profiles

The system will display a list of all networks you've previously connected to. Find the name of your target network (SSID) in the list. Next, to view the password for this specific network, use the command with the parameter key=clearThe syntax is as follows:

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

In the command output, find the "Security settings" section. The "Key Content" line will contain the password you're looking for in cleartext. Note that if the computer has never connected to this network, the profile will be missing from the list, and this method will not work.

View saved passwords through Windows settings

For those who prefer a graphical interface to working with code, Windows 11 offers an updated way to view keys. In earlier versions of the OS (Windows 10 and below), this functionality was hidden deeper or required third-party tools, but modern builds allow you to view the password through the network settings menu.

Go to Settings → Network and Internet → Wi-FiIf you're currently connected to a network, select "Properties." If not, click "Manage known networks," select the desired network from the list, and click "View" or "Properties." In the window that opens, find the "Network security key" field.

By default, characters are hidden behind asterisks. Click the eye icon to the right of the input field to reveal the password. The system may ask you to confirm your user account (enter your PIN or password for your Microsoft account/local admin). This is a standard precaution. verification, which protects data from random users on your computer.

  • 🔑 This method only works if the network profile is already saved in the system.
  • 👁️ Local administrator rights are required to view the password.
  • 💻 In Windows 10, the path may be different: "Network and Sharing Center" → "Wireless Network" → "Wireless Network Properties" → "Security" tab → "Show characters as you type."

Using a smartphone as a QR code decoder

Since a computer can't scan QR codes to connect, we can use the opposite logic. If you have access to a phone that's already connected to the network, you can get the QR code on the phone, take a screenshot or photo of it, and then recognize the text on the computer. However, the easiest way is to simply look up the password in the phone's settings.

On Android devices (Samsung, Xiaomi, Pixel), go to Wi-Fi settings, tap the gear icon next to the active network, and select "QR code" or "Share." The password itself is often written in text below the image. If there is no text, take a screenshot. Then use any online service or scanner app on another device to read the text from the line. P:.

On iPhone (iOS 16 and later), the process is even simpler. Go to Settings → Wi-Fi, tap the blue information icon (i) next to the network. Tap the "Password" field (hidden by dots). The system will perform biometric verification (FaceID or TouchID), after which the password will be displayed in plain text and can be copied.

What to do if the QR code is unreadable?

If the image is blurry or damaged, try increasing your phone's screen brightness to maximum. Also, make sure there are no oil marks on the camera lens. As a last resort, use the Live Text feature in the iPhone gallery or Google Lens on Android by pointing the camera directly at the screen.

Analysis of the WiFi QR code structure

Understanding how the information in a QR code is encoded helps troubleshoot connection issues. The standard WiFi string format is strictly defined. If you've decoded the code and see a strange string, it's important to be able to decipher it.

The string always starts with a prefix WIFI:. It is followed by parameters separated by semicolons. Parameter S: stands for SSID (network name), T: specifies the encryption type (WPA, WEP, nopass), and P: Contains the password itself. A semicolon is required at the end of the line.

Below is a table of the main parameters found in connection strings:

Parameter Description Example of meaning
S SSID (Network Name) Home_WiFi_5G
T Security type WPA; WEP; nopass
P Password SuperSecret123
H Hidden network true; false

It's important to note that some QR code generators may add extra characters or use non-standard encoding if the network is hidden. In such cases, manual verification of the characters is recommended. P: is critical for successful authorization.

☑️ QR code security check

Completed: 0 / 4

Restoring access via the router's web interface

If none of your devices remember the password, and it's not saved on your computer, the only reliable way is to access the router's settings. To do this, your computer must be connected to the router via Ethernet or Wi-Fi (even without internet access, local data will work).

Open your browser and enter your router's IP address in the address bar. Most often, this is 192.168.0.1 or 192.168.1.1The exact address is usually written on a sticker on the bottom of the device. You will need a username and password to access the admin panel (not to be confused with the Wi-Fi password). By default, this is often admin/admin.

After authorization, find the section Wireless or Wi-Fi SettingsIn the "Security" subsection, you'll find a "Wireless Password" or "Pre-Shared Key" field. Here, you can not only view the current password but also set a new, more complex one if you're not happy with the current one.

⚠️ Note: Router interfaces (TP-Link, ASUS, Keenetic, MikroTik) vary significantly. If you can't find the settings, check the official documentation for your model, as the menu layout may change with firmware updates.

Frequently Asked Questions (FAQ)

Is it possible to find out someone else's WiFi password by scanning their QR code?

No, that's impossible. The QR code contains the password in plaintext only for those who already have access to the network (for sharing with others). If you're not connected to the network and don't have router administrator rights, scanning someone else's code (if you could obtain it) will simply reveal the password, but won't magically grant you access if the network uses modern encryption protocols and MAC address filtering. Furthermore, accessing someone else's network without permission is illegal.

Why doesn't Windows show the password as asterisks that can be removed?

In older versions of Windows (XP, 7), it was possible to "peek" at a password by unchecking the box. In modern versions (10, 11), Microsoft has strengthened security by removing this feature from the standard network properties interface, preventing anyone with physical access to an unlocked computer from stealing stored keys. Now, either entering an administrator password or using the command line is required.

Is it safe to store a QR code with a password in the phone gallery?

This is risky. If your phone falls into the wrong hands or is infected with malware, an attacker can open the image, scan the code, and gain access to your network. It's better to dynamically generate a QR code through the settings each time you need to connect a guest, or use a guest network with a temporary password.

What should I do if the netsh command says "Network not found"?

This means your computer has never connected to this specific network, or the profile has been deleted. In this case, you won't be able to recover the password via the command line. You'll have to reset the router or remember the password to re-enter it.