How to find a WiFi password using a QR code

In today's digital world, guests are often granted access to wireless networks via convenient QR codes that can be scanned with a smartphone camera in seconds. However, situations arise when a device is already connected but the password has been forgotten, requiring a new device to be connected manually or a security key to be entered into the router settings. The standard Android or iOS interface hides the password characters behind asterisks, but they are securely encrypted within the graphic code the system generates for quick authorization.

Understanding the structure QR code It allows you to extract not only the network name (SSID) but also the hidden access string. This is possible because the data encoding standard in such tags is open and readable by most scanner applications. You won't need complex hacking tools or root privileges if you use the right tools to decode the image.

In this article, we'll examine in detail how pattern encryption works, and explore methods for reading data from another device's screen or a saved image in the gallery. We'll also touch on security issues, as being able to read a password means anyone with physical access to your screen with the code can potentially gain access to the network.

How QR codes for WiFi networks work

Graphic codes used to connect to wireless networks are formed according to a strict standard defined by the Wi-Fi Alliance specification. Rather than an arbitrary set of characters, a format string is used, which begins with a prefix. WIFI:This prefix tells the device's operating system that the scanned data should be interpreted as network settings, and not as plain text or a link.

The encoded string contains parameters separated by semicolons. The main fields are the encryption type (T), network name (S) and the password itself (P). For example, the line might look like WIFI:T:WPA;S:MyHomeNetwork;P:SuperSecretPass123;;The operating system reads the value after P: and automatically inserts it into the authorization field, hiding the input process from the user.

⚠️ Important: If you place a QR code with a password in a public place or in a visible location in your office, remember that anyone with a camera can read the data. The password in the code is not additionally protected; it is transmitted in clear text within the image.

For successful data extraction, it is critical that the code image is clear and free from severe distortion. Error correction algorithmThe technology built into the QR standard allows information to be read even if up to 30% of the code area is damaged, but blurring of the boundaries between black and white modules can make decoding impossible.

Technical details of the string format

The string always ends with a double semicolon (;;). If the password uses special characters, such as semicolons, they must be escaped with a backslash (\), otherwise the parser will truncate the password string prematurely.

Methods for reading code from the screen of another device

The most common scenario is when you need to know a password when one device (for example, a friend's laptop) is already connected to the network and can display a QR code, but you need to enter the data manually on another device. In the Android operating system, this functionality is built directly into the settings. Go to Settings → Connections → Wi-Fi, click on the gear next to the active network and select the button QR code or Share.

Once the code appears on the screen, you have two options. The first is to use a second device with a camera and a scanner app that can display text content. The second, more complex but useful if you don't have a second device handy, is to take a screenshot of the screen containing the code. The screenshot will be saved to your gallery, where you can analyze it later.

  • 📱 Use the built-in scanner in your camera: point the lens at the code, but don't click "Connect." Look for the pop-up notification with text.
  • 📸 Take a screenshot: If a friend shows you the code, ask them to save the image and send it to you via messenger without compression.
  • 🔍 Use Google Lens: In the Google app or Gallery, select the "Lens" feature to analyze the image.

It is important to note that on devices iPhone iOS 16 and later also feature the ability to share passwords via AirDrop or view a QR code in network settings if the device is already authorized. The functionality is similar to Android, but the interface may differ depending on the firmware version.

📊 How do you most often share WiFi?
I show the QR code
I dictate the password by voice
I'm sending it via messenger.
I give the phone into your hands

Image analysis through applications and online services

If you have a saved image of a QR code in your gallery (a screenshot or photo), you can get the password using specialized apps or online decoders. This method is universal and works regardless of the phone model, whether it's a budget one. Android or a flagship smartphone. The method involves programmatically recognizing a pattern and displaying a hidden text string.

One of the most reliable and secure ways is to use the app Google LensIt's built into many galleries and Google search. Open the code image, click the lens icon, and the system will highlight the text areas. A box labeled "Wi-Fi Network" will appear at the bottom. Clicking on it often reveals connection details, including the password (if the system allows it), or allows you to copy the raw string.

⚠️ Caution: Be extremely cautious with online QR code decoding services. By uploading an image to an unknown site, you potentially disclose your home network information (SSID and password) to third parties. Use only trusted offline apps.

For complete security, we recommend using offline apps from the Play Market or App Store that don't require internet access. Search for "QR scanner" and choose a highly rated app that guarantees local data processing on the device. After installation, open the app, select "Image" or "Gallery" mode, and select the file containing the code.

The scan result will be presented as text. Look for the line starting with P:All characters between P: and the next semicolon ; (or two semicolons ;; at the end of the line) is your password. If your password contains special characters, the app may display them in escaped form, so keep this in mind when entering them.

☑️ App Security Check

Completed: 0 / 4

Using the command line and terminal

For advanced users who prefer full control over their data and don't trust third-party apps, there's a decoding method via the command line on a PC or the Android terminal (with root access or ADB). This method requires installing a utility. zbar or using Python scripts with the library pyzbarThis is the most transparent method, since you can see the source code being processed.

If you have a computer running Linux or macOS and have the package installed ZBar ToolsThe process will take a couple of seconds. First, you need to save the QR code image in PNG or JPG format. Then, open the terminal and execute the scan command. The result will be immediately displayed in the console.

zbarimg -q --raw image_with_qr.png

In the command output you will see the same format string WIFI:T:WPA;S:Name;P:Password;;Select the part after P: and use it to connect. On Windows, you can use PowerShell with enabled modules or specialized ports of the zbar utility, although installation may take longer than on Unix-like systems.

Method Complexity Security Required software
Google Lens Low High (offline) Google app
Online decoder Low Low (risk of leakage) Browser
Command line (zbar) High Maximum Terminal / zbarimg
Special applications Average Depends on the developer QR Scanner

Nuances for different operating systems

Differences in the implementation of security functions and file system access between Android And iOS dictate different approaches to solving the problem. On Android, thanks to the open file system, you can easily save a screenshot of a QR code, transfer it via Bluetooth or USB, and process it with any tool of your choice. The system is less strict about app access to the clipboard and gallery (although this is changing in newer versions of Android).

The situation is different in the Apple ecosystem. iOS has a sandbox, so apps can't simply read the screen contents of other apps or arbitrarily scan the gallery without the user's explicit permission at the time of the action. However, if the QR code is already saved in Photos, the standard Camera app or Google Lens (as a widget or through the Google app) will handle the task without any problems.

The operating system version should also be taken into account. On older versions of Android (below 10), the native QR code generator functionality in WiFi settings might be missing, forcing users to use third-party apps to generate the code, which, however, often also displayed the password in plain text immediately after generation.

  • 🤖 Android: Full access to files, many analysis tools, the ability to use ADB.
  • 🍏 iOS: Strict process isolation, reliance on built-in camera functions and widgets, high data security.
  • 💻 Windows/macOS: Ideal for deep image analysis via the terminal when a phone is unavailable.

It's also important to consider screen resolution. If the QR code is displayed on a low-resolution device or is small, autofocus cameras may be unable to detect small details (modules). In such cases, zooming in or using a higher-resolution camera from a distance can help.

Security issues and network protection

The very fact that it's easy to extract a password from a QR code dictates certain rules of digital hygiene. A QR code containing your home network password is essentially the equivalent of a key written on paper. If you print out such a code and hang it in the hallway for guests, you should be aware of the risks. Anyone who photographs the code (even if they're passing an open door or window) will gain access to the network.

For guest networks, it is recommended to use the mechanism guest access, which is found in most modern routers. This mode creates a separate network with isolated access to local resources (printers, NAS, other computers). The password for the guest network can be changed frequently, and its leakage via a QR code will not compromise your personal data.

⚠️ Warning: Never post QR codes with access to the main network in public places, social media, or on forums. This is tantamount to publishing your password publicly.

If you suspect your password has been compromised via a QR code (for example, if the code was publicly available), immediately change the security key in your router settings. After changing the password, all previously connected devices will lose connection and will require re-authorization, which is the correct action in the event of a potential breach.

Is it possible to recover a password if the QR code is damaged?

Yes, the QR code standard includes error correction levels (L, M, Q, H). If less than 30% of the code area is damaged (level H), most scanners will be able to read the information. If the damage is more severe, software data recovery is virtually impossible, as the matrix structure is compromised.

Is it safe to use online QR decoders?

No, it's risky. By uploading an image with your network access code to a third-party server, you're sending your credentials (login and password) to an unknown third party. Use only offline apps or local utilities.

What to do if the password contains special characters?

Special characters may be escaped in the WiFi string format. When manually entering the password obtained from the decoded string, carefully check for backslashes or other escape characters and enter them exactly as they appear, or try without them if the connection fails.

Does this method work for hidden networks (Hidden SSID)?

The QR code for a hidden network also contains an SSID field, but it may be empty or marked as hidden. However, the password field (P:) is still present in the code. After scanning the code, you'll receive a password, but to connect, you'll need to manually enter the network name, as it may not be picked up automatically.

How to create your own QR code with a password?

You can use your router settings (often found in the Wi-Fi section), the Google Camera app on Android (the "Share" feature), or specialized QR code generators by entering your network information. This will create an image that others can scan.