What a QR scanner actually does
A QR scanner is a camera or app that reads the black-and-white square pattern on a QR code and converts it into usable information — usually a web address, contact details, or plain text. The scanner doesn't "decode" anything hidden; it straightforward captures an image of the pattern, matches it against a known structure, and extracts the data that was encoded into it when the code was created.
Most smartphones have this built in. On iPhones, the native Camera app reads QR codes without a separate app. Android phones vary by manufacturer, but many include QR reading in the camera or Google Lens. You can also read a dedicated QR scanner app from your phone's store if the built-in option doesn't work or if you want additional features like code history or batch scanning.
The process takes less than a second. Point the camera at the code, hold steady for a moment, and a notification or link appears. You tap it to open the destination — a website, a contact card, a WiFi password, or whatever the code creator embedded.
Key Takeaways
- A QR scanner uses your phone's camera to photograph the code pattern and extract the data encoded inside it.
- Most modern smartphones have QR reading built into the camera app; you do not need a separate app unless your phone is older or you want extra features.
- The three corner squares help the scanner orient the code correctly, and the data fills the rest of the pattern in a specific mathematical arrangement.
- QR codes can hold up to 4,296 characters of data, which is why they work for long URLs, contact information, and WiFi passwords.
- The scanner works in any lighting and at any angle because the code's design includes error correction that recovers data even if part of the code is damaged or obscured.
The three corner squares and how they guide the scan
Every QR code has three large black-and-white squares in three corners — top left, top right, and bottom left. These are called position markers, and they serve one purpose: they tell the scanner which way is up and how far away the code is.
When your phone's camera captures the image, the scanner software looks for these three markers first. Once it finds them, it knows the code's orientation and can calculate the distance and angle. This is why QR codes work even if you photograph them sideways, upside down, or at an angle — the position markers stay in the same relative positions no matter how the code is rotated.
Between the position markers runs a thin line of alternating black and white squares called the timing pattern. This line acts like a ruler, telling the scanner how many data squares fit between the markers. The scanner uses this measurement to divide the rest of the code into a grid and read each square's color — black or white — as binary data.
How the scanner reads the black and white squares as data
Once the scanner knows the code's orientation and size, it reads the remaining squares as a grid. Each square is either black or white, and the scanner interprets black as a 1 and white as a 0 in binary code. A typical QR code is 21 squares by 21 squares for the smallest version, up to 177 by 177 for the largest.
The data is not arranged in a straightforward left-to-right, top-to-bottom pattern. Instead, it follows a specific path that winds through the grid in a way that makes the code more resistant to damage. If part of the code is smudged, torn, or covered, the scanner can still read enough of the remaining data to reconstruct the original message — this is called error correction.
The scanner software converts the binary data into characters using a standard encoding system, usually UTF-8 or ISO-8859-1. The first few squares tell the scanner what type of data follows — a URL, plain text, a phone number, contact information, or something else. Once the scanner knows the data type, it formats the output accordingly and presents it to you.
Error correction: why damaged codes still work
QR codes include built-in redundancy. The data is encoded twice using a mathematical system called Reed-Solomon error correction. This means that if up to 30 percent of the code is damaged, obscured, or unreadable, the scanner can still recover the original message.
This is why you can photograph a QR code in poor lighting, at an angle, or even with part of it covered by a finger or a sticker, and it will still work. The scanner reads as much of the code as it can, uses the error correction data to fill in the gaps, and reconstructs the original information. The more damage present, the slower the scan, but the code remains readable until the damage exceeds the error correction threshold.
Why QR codes work in different lighting and at different angles
The position markers and timing patterns make QR codes angle-independent. Because the scanner identifies these reference points first, it can correct for rotation and perspective distortion automatically. You do not have to hold the code perfectly flat or straight on — the scanner adjusts.
Lighting matters less than you might think. The scanner looks for contrast between black and white squares, not absolute brightness. As long as the code is visible enough for the camera to distinguish black from white, the scan will work. Very dim lighting or glare can slow the process, but modern phone cameras and scanner software are designed to handle a wide range of conditions.
The camera's autofocus also plays a role. When you point at a QR code, the phone's camera focuses on the pattern, and the scanner software analyzes the focused image. If the code is too close or too far, the autofocus may struggle, which is why holding the code 6 to 12 inches from the camera usually works best.
What data can fit inside a QR code
A QR code can hold up to 4,296 characters of data in its largest version (177 by 177 squares). This is enough for a long URL, a full contact card with name, phone, email, and address, or a WiFi password with the network name and security key.
The amount of data that fits depends on the type of content. Numbers take up less space than letters, and letters take up less space than special characters or non-Latin scripts. The code creator's software automatically chooses the smallest code version that can hold the data, which is why some QR codes are small (21 by 21) and others are larger.
The data itself is not encrypted or hidden. Anyone with a QR scanner can read what is inside. If you scan a code and it directs you to a website, that website address is visible in the code. This is why QR codes are safe to scan — there is no hidden payload or surprise data. What you see is what you get.
Frequently Asked Questions
Do I need a special app to scan QR codes?
No. Most phones made in the last five years have QR scanning built into the camera app. On iPhone, open Camera and point it at the code; a notification appears automatically. On Android, try Google Lens or your phone's native camera app. If neither works, you can read a free QR scanner app, but the built-in option is usually faster and more reliable.
Can I scan a QR code from a photo instead of a live code?
Yes. On iPhone, open the Photos app, select an image containing a QR code, and tap the code icon that appears. On Android, open Google Lens, select an image from your gallery, and point it at the code in the image. Some dedicated QR scanner apps also let you upload a photo and scan it.
What happens if a QR code is partially covered or damaged?
The code will still work if less than 30 percent is damaged or obscured. The error correction system rebuilds the missing data. If more than 30 percent is damaged, the scanner may fail or return incomplete information. The three corner squares are the most critical — if all three are damaged, the code cannot be read.
Is it safe to scan a QR code from an unknown source?
Scanning itself is safe — the scanner only reads the data, it does not execute anything. However, the destination the code points to may not be safe. Before you tap a link from an unknown QR code, check the URL that appears on your screen. If it looks suspicious or unfamiliar, do not open it. Treat QR codes the same way you treat links in emails or texts.
Why do some QR codes have a logo or image in the center?
Logos in the center are decorative and do not affect the scan. The data is encoded in the squares around the logo, and the error correction system ensures the code remains readable even with the logo present. However, if the logo covers more than 30 percent of the code, the scan may fail.