ELI5: How do QR codes work?
Explained with a secret puzzle
A QR code works like a secret puzzle made of black-and-white squares that your smartphone camera can solve instantly to open a website, show a restaurant menu, or pay a bill.
Think of it like a board game filled with tiny tiles. When you write a message, you use the alphabet. But computers and phones don't read words the same way we do; they prefer to read patterns. A QR code takes normal information, like the internet link to a video, and translates it into a checkerboard pattern of dark and light squares.
When you point your phone's camera at one of these codes in everyday life, here is what happens:
- Finding the corners: You will always see three large squares in the corners of a QR code. These act like traffic signs that tell your phone, "Look here! This is the top, this is the bottom, and this is which way to hold the picture." Even if you scan the code upside down, your phone knows how to read it.
- Reading the dots: The camera looks at all the smaller dots in between the corners. Just like reading words from left to right in a book, your phone's brain scans the light and dark tiles to turn the pattern back into letters and numbers.
- Taking action: Once your phone reads the secret message, it immediately does what the code says, such as popping up a link to the ice cream shop's flavor list or connecting your tablet to the home Wi-Fi network without you having to type a long password.
The neatest trick of a QR code is its error correction. Imagine if you spilled a drop of chocolate milk on a printed book page; you could probably still guess what the missing word was by reading the rest of the sentence. QR codes do the same thing. They contain backup copies of their own pattern, so even if a code on a bus stop poster is torn, dirty, or scratched, your phone can still solve the puzzle without any trouble.
Ask your own question
Follow-up questions
Test yourself
Three quick questions to see if it stuck. You can challenge a friend after.
Get this entry by email
We'll send it to your inbox, plus one good explanation a week if you like.