Wirebook

Wirebook › Bonus lesson

Can a sticker change where a QR code takes you?

Bonus lesson · about 8 minutes · hands-on · nothing you type leaves your browser

A QR code is just a square of black and white dots, yet your phone turns it into a web address in a blink. How does it know where the dots start, how does it survive a scratch, and could someone stick a different code on top? Build a code, damage it and try a real scanner, then be the sticker detective. Everything happens in your browser, and no link on this page is ever opened.

Step 1: what are all those squares for?

Type a pretend message (it stays on this page) and colour the parts. Each little square is called a module. Most carry your message, but some are signposts that help a camera find and read the grid.

    How a camera reads the grid

    Step 2: the scratch test

    This code holds a pretend café menu address. Pick some damage and a real QR decoder (the same kind of code your phone runs) tries to read the same damage on four codes, one for each spare-data level. Choose “Scratch it yourself” to rub bits out with your finger or mouse.

    Why spare data works (and when it can't)

    The spare data isn't a second copy of the message. It's a clever set of extra numbers worked out from the message (a checksum's much smarter cousin), so that if some pieces go missing the scanner can work backwards and rebuild them. More spare data lets it rebuild more, but it needs more squares, so the same message makes a bigger, busier grid. That is why a code with a logo in the middle usually uses level H: the logo is deliberate damage.

    Two things spare data can't fix. If one of the corner squares is covered, the scanner never finds the grid in the first place. And if a whole new code is stuck on top, there is nothing to repair: the scanner happily reads the new code, because it is a perfectly good QR code. Which brings us to the detective work.

    Step 3: be the sticker detective

    Five pretend posters. Look closely first, then press Preview where it goes to see what the code really holds (nothing opens). Compare it with the address printed on the poster and decide. Every address here ends in .example, a name set aside for examples, so none of them are real.

    The habits that beat a fake code

    Preview, compare, and type what you know. Most phone cameras show the address before opening it, so read it first. Find the real site name by reading the end of the address (everything before it can be decoration). If the code asks you to pay or log in, it is safer to type the address printed on the sign, or one you already know, than to trust a code. And look for a sticker: a raised edge, a slightly different white or a code that is a bit crooked.

    Grown-up twins: Tooltern's QR code scanner reads a code from a photo or screenshot and shows the real site name with warning signs (it never opens the link), the guide Is this QR code safe?, and the QR code maker with its spare-data levels.

    Words from this lesson

    Earn a bonus badge

    Get all 5 right to collect the Sticker detective bonus badge. Bonus badges are extra: they don't change your stamp count or rank. Wrong answers are fine: just try again.

    1. What are the three big squares in the corners of a QR code for?

    2. A price sticker covers part of a QR code but it still scans. Why?

    3. Someone sticks a whole new QR code over the one on a parking machine. What does your phone read?

    4. A code goes to https://swiftparcel.example.rebook-now.example/fee. Which site is it really?

    5. A code on a poster asks you to pay. What is the safest move?

    Try another lesson

    1. 3Can a website get tired?7 min · interactive
    2. 12How does a game remember where you got to?6 min · interactive
    3. 1What happens when you open a web page?6 min · interactive