HOW THE DIGITAL WORLD REALLY WORKS · CHAPTER 04

The Incredible QR Code — Interactive Lab

Discover. Experiment. Code. Invent.

1 / Create a real QR symbol

Version 1, printable ASCII, fixed mask 0. No network or library needed.

Click a payload square to flip its bit. Function patterns are protected in this lab.

Data and correction codewords

The clean symbol can be scanned by a separate QR reader. This lab decodes the known grid directly, not camera images.

2 / Damage and repair

Compare the number of changed modules with the number of affected codewords. Above the correction limit, a decoder can fail or return a wrong message.

3 / Investigate duplicate labels

A repeated scan is only a signal to investigate. This fictional registry never collects personal data.

Code workshop

Read and edit the actual encoder and decoder below. Run your own JavaScript in a sandboxed frame. The editor includes the complete engine and a sample test.

Return to the companion index