Anatomy of a QR Code: What Shapes the Pattern?
How QR code version controls module count, how mask patterns sculpt the dark/light texture of the data area without changing the data, and how data mode rewrites which characters are converted into bits.
A complete interactive classroom, not just a preview.
Start when you are ready to enter this Stage's 8 scenes and explore, respond, and learn as you go.
How do QR code version, mask pattern, and data mode independently shape the final QR code image?
Every QR code looks like a chaotic scatter of squares, yet a few hidden switches change everything about how it looks.
You may think the version number controls the dots, or that data lives in the squares themselves — but which switch really drives the final look?
Side-by-side rendered QR codes with the same text but different versions, masks, and data modes, plus a manipulation panel where the viewer can flip each switch.
A clear, visual answer to which parameter controls size, which sculpts the inner texture, and which rewrites which characters survive encoding.
Most people guess that the version number controls how much data fits and assume the mask is just decoration, missing that data mode silently swaps the bit patterns even when the text looks identical.
- Error correction level internals (L/M/Q/H tradeoffs)
- Reed–Solomon polynomial details
- Micro QR codes and other QR variants
- Reading/decoding algorithm steps
- Color and logo customization overlays
- 01Three Switches Behind Every QR CodeslideQuestion
Introduce the driving question by showing three seemingly identical QR codes and asking which slider — version, mask, or data mode — changed each one.
- Version, mask, and data mode are the three orthogonal inputs
- The final image is shaped by all three at once
- Each switch leaves a distinct visual fingerprint
- 02What Changes When You Flip a Switch?quizPrediction
Let the learner commit to one prediction: which of the three switches (version, mask, data mode) most directly controls the SIZE of a QR code?
- Make one independent choice before seeing evidence
- Commit to a hypothesis to test against the visual proof
- 03Flip the Switches, Watch the Dots MoveinteractiveEvidence
An interactive panel where the learner keeps the input text constant and independently changes version, mask pattern, and data mode, watching the QR code regenerate live.
- Changing version grows or shrinks the module grid
- Changing mask scrambles texture without changing size
- Changing data mode can rearrange dots even at the same version and mask
- 04Version = Grid Size, Mask = Texture, Mode = Bit StreamslideExplanation
Explain each switch's role: version fixes the module count from 21×21 up to 177×177, mask XORs the data region with one of 8 patterns to balance light/dark, and data mode rewrites which bit patterns represent the same characters.
- Version sets the fixed module grid (21 + 4·(V−1))
- Mask pattern XORs data modules to avoid large run-lengths
- Data mode changes the bit encoding of the input characters
- 05Same Text, Eight Different FacesslideEvidence
Show a 3×3 grid: one row comparing versions of the same text, one row comparing all 8 mask patterns at a fixed version, one row comparing data modes. The pattern of differences makes each switch's signature obvious.
- Version row: outer grid size changes, content shifts
- Mask row: same grid size, data region texture scrambles
- Mode row: same grid size and mask, dot positions still shift
- 06When a Switch Has No EffectinteractiveBoundary
Show the limits: switching to a mode that cannot represent the input forces a different encoding, and downgrading version can fail outright if capacity is exceeded. The learner tries to break each switch.
- Lowering version below required capacity fails to render
- Some data modes cannot encode certain character sets
- Mask choice has no effect on decoded data, only on appearance
- 07Apply It: Design This CodequizTransfer
One transfer question: given a short URL that must fit on a business card, the learner chooses the combination of version, mask, and mode that produces the smallest, cleanest-looking QR code.
- Transfer the explanation to a new constraint
- Choose version for capacity, mode for compactness, mask for visual cleanliness
- 08The Three Switches, AnsweredslideResolution
Resolve the driving question directly: version controls size and capacity, mask controls the visual texture of the data region without altering the bits, and data mode controls how the input is translated into the bit stream — and therefore which dots appear.
- Version → grid size and module count
- Mask pattern → XOR texture over data modules
- Data mode → bit encoding of the input string
Discussion threads for a Stage aren't available yet.
This path ends here.