In this article5 sections
You scan one to see a restaurant menu, pay for parking, board a plane or join a Wi-Fi network. QR codes have become part of everyday life, but most of us have never thought about what those little squares actually contain.
Where QR codes came from
QR codes were invented in Japan by Masahiro Hara and a colleague at Denso Wave, a company that makes barcode readers, and released in 1994. They were designed to track car parts in factories.
Ordinary barcodes could hold only about 20 characters and be read in one direction. Factory workers wanted something that held much more, including Japanese characters, and could be scanned quickly. The name QR stands for quick response.
Crucially, Denso Wave kept the patent but chose not to enforce it, so anyone could use QR codes for free. That decision is a big reason they spread worldwide. They became an international standard in 2000.
How a QR code stores information
The grid
A QR code is a square grid of tiny black and white squares called modules. Each module is like a single bit of computer data: black or white, one or zero. The information, such as a web address, is converted into a long string of these ones and zeros and laid out across the grid.
The smallest QR code has 21 × 21 modules. The largest has 177 × 177 and can hold several thousand characters. Most codes you see in daily life are small, because they only contain a short web link.
The three corner squares
The big squares in three corners are position markers. They let a phone camera find the code quickly, work out its size and tell which way up it is, so you can scan it upside down or at an angle.
The developers chose their pattern carefully. They studied flyers, magazines and cardboard boxes to find a black-and-white pattern that almost never appears in normal printing, so scanners wouldn’t confuse it with anything else.
The smaller parts
Other fixed patterns help the scanner as well:
- Timing patterns, lines of alternating black and white squares, help it work out the grid spacing.
- An alignment square, found in larger codes, helps correct for codes printed on curved surfaces or viewed at an angle.
- A small area holds format information, telling the scanner how the code is set up.
Why damaged codes still scan
QR codes include extra, carefully calculated data that allows missing parts to be rebuilt, using a method called Reed–Solomon error correction, the same idea used on CDs and DVDs.
There are four levels:
- Low: about 7% of the code can be damaged and still read
- Medium: about 15% (the most common choice)
- Quartile: about 25%
- High: about 30%
That is why a code can still work when it is scratched, smudged or has a logo printed in the middle. More error correction means more of the grid is used for backup data, leaving less room for the actual information.
A QR code is usually just a web link written in a pattern your camera can read.
How QR code scams work
Because you can’t read a QR code with your own eyes, you can’t tell where it leads until you scan it. Criminals take advantage of this. The FBI has warned that criminals tamper with QR codes to send people to fake websites that steal login and payment details.
Common tricks include:
- Stickers over real codes on parking meters, posters or restaurant tables, leading to a fake payment page
- QR codes in emails, letters or text messages claiming to be from a bank, delivery company or government agency
- Codes that prompt you to download an app from outside the official app store
This kind of scam is sometimes called “quishing”, a mix of QR and phishing.
How to scan safely
- Check the web address your phone shows before opening it. Be wary of misspellings, odd domains or shortened links.
- Look for tampering. On parking meters and posters, check whether the code is a sticker placed over something else.
- Be suspicious of codes in unexpected messages, especially ones that create urgency, such as “your parcel is held” or “your account is locked”.
- Use the official app or website to pay where you can, instead of a code on a sign.
- Don’t download apps from QR codes; use your phone’s official app store.
- If you think you entered details on a fake site, contact your bank straight away and change your password.
Frequently asked questions
Can a QR code contain a virus?
A QR code itself is just data, usually text or a link. The danger comes from where it takes you, such as a fake website or a harmful download. Modern phones show you the link before opening it.
Do QR codes expire?
A standard QR code never expires, because it simply contains the information printed in it. Some services use “dynamic” codes that point to a link they control, and those can stop working if the service is cancelled.
Can I make my own QR code?
Yes. Many phones and free tools can create one for a web link, contact details or Wi-Fi login. Keep it simple and test it before printing.



