QR Codes Explained: From Barcodes to Smart Squares

The internet is littered with QR code explainers that tell you nothing useful. Most of them spend paragraphs comparing QR codes to hallways or some other pointless analogy. This isn't one of those. Here's what actually happens when you scan a QR code, explained clearly without the padding.

The Basic Difference: 1D vs 2D

Traditional barcodes store data in one dimension: a series of vertical lines of different widths. That's it. You can fit about 20 characters maximum. They only work when scanned horizontally, and they break if they're damaged.

QR codes do the same job but use two dimensions—a grid of black and white squares. This lets them store up to 7,000 characters or more. They work at any angle. They can be read even if 30% is damaged. That's not magic; that's better engineering.

How QR Codes Actually Encode Information

A QR code is a bitmap image. Each black square represents a 1 in binary. Each white square represents a 0. String enough of those together, and you've encoded anything from a URL to a WiFi password to contact information. Your phone's camera captures the image, the software decodes the binary data, and then executes it.

The position markers (the three corner squares)

Every QR code has three large squares positioned at the top-left, top-right, and bottom-left corners. These aren't decoration. They're position markers that allow the scanner to determine orientation and scale. This is why QR codes work when rotated, upside down, or at an angle. The scanner finds these markers first, uses them to establish a reference frame, then reads the data grid.

The timing patterns

Between the position markers run alternating black and white lines (the timing patterns). These tell the scanner how large each individual square should be. Without them, a scanner wouldn't know if it's looking at a 21x21 grid or a 177x177 grid.

The data area and error correction

The remaining squares are divided into two parts: the actual encoded data, and redundancy information. Specifically, QR codes use Reed-Solomon error correction. This means about 30% of the code is redundant information that lets your phone reconstruct the original data if parts are damaged, blurry, or obscured. It's the same algorithm used in QR codes' original application: scanning barcodes in dusty warehouses.

The format information

There's a small area near the position markers that tells the scanner what error correction level is being used, and what data encoding scheme (numeric, alphanumeric, binary, kanji, etc.). This metadata is critical—without it, the scanner wouldn't know how to interpret the data it reads.

The Data: What Gets Encoded

A QR code doesn't store URLs or WiFi passwords directly. It stores them as bits. Here's what actually fits:

  • Numeric: 7,089 digits maximum
  • Alphanumeric: 4,296 characters (uppercase letters, numbers, and a few symbols)
  • Binary/Byte mode: 2,953 bytes (any data, including lowercase letters and Unicode)
  • Kanji: 1,852 characters

The encoding mode affects capacity. If you're only storing numbers, you get more. If you're storing mixed case with symbols, you get less. Most QR codes use binary mode because it's most flexible.

Standard QR Code Specifications

All QR codes follow ISO/IEC 18004, the international standard. This is why they work universally. The standard defines:

  • Version: Sizes range from Version 1 (21x21 pixels) to Version 40 (177x177 pixels). More data = larger code.
  • Error correction levels: L (7% recovery), M (15% recovery), Q (25% recovery), H (30% recovery). Higher levels mean more redundancy but larger codes.
  • Data mask patterns: 8 different patterns applied to make sure the code isn't accidentally all-black or all-white in any section.

Static vs Dynamic QR Codes

Here's where people get confused, so let's be precise.

Static: The entire URL or data is embedded in the code itself. Print it, and it points to that URL forever. Change the destination? You need a new code.

Dynamic: The code points to a redirect service. The code itself never changes, but the backend URL can be updated anytime. You get tracking data on how many times it was scanned. Your server goes down? The code breaks until it's back up.

For permanent information (WiFi passwords, fixed URLs), use static. For marketing campaigns where you'll want to change destinations or need scan data, use dynamic.

Practical Applications

QR codes encode:

  • URLs: Most common. Scan to visit a webpage.
  • WiFi credentials: Network name, password, and security protocol (WPA2, WPA3, etc.).
  • Contact information (vCard): Name, phone, email, address—structured data your phone recognizes.
  • Payment instructions: Bank transfers, mobile payments, cryptocurrency addresses.
  • Event tickets: Unique identifier that venues scan to verify entry.
  • Geographic coordinates: Latitude and longitude encoded as a URL.
  • Calendar events: Date, time, location in standard iCal format.
  • Email or SMS: Pre-populated message with recipient and subject line.

Why QR Codes Work at Any Angle

The three position markers aren't randomly placed. They form an L-shape that's asymmetrical. Your phone scans the code, identifies all three corners, and from that geometry determines: the scale, the rotation, and the perspective. From there, it can read the data grid accurately no matter the angle.

This is why damaged QR codes often still work. As long as two position markers are visible and enough data area is readable, error correction can reconstruct the missing parts.

The Scanning Process

When you scan a QR code:

  1. Your phone's camera captures the image.
  2. Image processing finds the three position markers.
  3. The software calculates grid size and perspective correction.
  4. It reads the format information and selects the right error correction algorithm.
  5. It decodes the data, applying error correction if needed.
  6. The decoded data is interpreted (URL, WiFi, contact, etc.).
  7. The appropriate action is triggered (open browser, connect to network, etc.).

All of this happens in under a second on modern phones.

The next time you scan a QR code with your phone, you'll know exactly what's happening behind the scenes. Those three corner squares, the black and white pattern, and the built-in error correction—they're all working together to instantly connect you to information. Pretty neat for a simple-looking square, right?

Ready to Create Your QR Code?

Use QRExpress to generate professional QR codes with custom colors and branding.

Create QR Code Now