Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

A QR code is a two-dimensional barcode that stores information in a grid of black and white squares. It matters because a phone camera can read it quickly even when the code is small, rotated, or partly damaged. QR codes are used for website links, tickets, payments, inventory labels, and classroom activities because they connect physical objects to digital data.

Their power comes from combining simple pixel patterns with careful rules for locating, encoding, and checking data.

When a scanner sees a QR code, it first finds the large square position markers and uses them to measure the code's size, angle, and perspective. The data bits are stored as dark and light modules arranged in a zigzag pattern, along with format information that tells the scanner how the code was masked and how much error correction is included. Error correction uses extra mathematical data so the original message can often be recovered even if part of the QR code is dirty or hidden.

After unmasking and error correction, the scanner converts the bits back into text, a URL, or another data type.

Key Facts

  • A QR code stores data in modules, which are the small square units of the grid.
  • Binary encoding uses dark and light modules to represent bits, where each bit is 0 or 1.
  • Finder patterns are the three large corner squares that help the scanner locate and orient the code.
  • Reed-Solomon error correction adds extra codewords so damaged or missing data can be reconstructed.
  • QR capacity depends on version, error correction level, and data mode, such as numeric, alphanumeric, byte, or kanji.
  • Higher error correction improves damage resistance but reduces the space available for the actual message.

Vocabulary

Module
A module is one small square cell in a QR code grid that is read as dark or light.
Finder pattern
A finder pattern is one of the large square markers that lets a scanner find the QR code's position and orientation.
Error correction
Error correction is the use of extra encoded data to recover the message when part of the QR code is damaged or unreadable.
Mask pattern
A mask pattern is a rule that flips selected modules to avoid confusing visual patterns and make scanning more reliable.
Codeword
A codeword is a group of 8 bits used as a basic unit for storing QR data and error correction information.

Common Mistakes to Avoid

  • Thinking a QR code is just a picture. It is wrong because the picture follows strict grid, timing, format, data, and error correction rules.
  • Ignoring the quiet zone around the code. It is wrong because scanners need a clear blank border to separate the QR code from nearby text or graphics.
  • Assuming bigger always means more data. It is wrong because data capacity also depends on the QR version, encoding mode, and error correction level.
  • Covering finder patterns with a logo. It is wrong because the scanner may fail to locate or orient the QR code if the corner markers are blocked.

Practice Questions

  1. 1 A QR code has a 29 by 29 module grid. How many total modules does it contain?
  2. 2 A message uses 18 codewords, and each codeword is 8 bits. How many bits are used for the message before adding error correction?
  3. 3 Explain why increasing the error correction level can make a QR code more reliable but also reduce the amount of new information it can store.