· 8 min read

What is a QR Code? History, Types & How It Works

QR codes are everywhere — on restaurant menus, product packaging, event tickets, and advertisements. But what exactly are they, and how do those small black-and-white squares store information?

A Brief History of QR Codes

QR code stands for Quick Response code. It was invented in 1994 by Masahiro Hara at Denso Wave, a Japanese subsidiary of Toyota. The original purpose was to track automotive parts during manufacturing — conventional barcodes were too limited in the amount of data they could store.

Unlike traditional barcodes that store data in one dimension (horizontal lines), QR codes store data in two dimensions — both horizontally and vertically. This allows them to hold significantly more information: up to 7,089 numeric characters or 4,296 alphanumeric characters.

Denso Wave released the QR code specification publicly and chose not to enforce their patent rights, which led to widespread adoption. Today, QR codes are standardized under ISO/IEC 18004.

How QR Codes Store Data

A QR code is made up of black and white modules (squares) arranged in a grid. Here's how the different parts work:

Finder Patterns

The three large squares in the corners (top-left, top-right, bottom-left) are finder patterns. They help scanners quickly locate and orient the QR code, even if it's tilted or partly obscured. This is why QR codes can be scanned from any angle.

Alignment Pattern

Larger QR codes (version 2 and above) include smaller alignment patterns to help correct for distortion — such as when the code is printed on a curved surface.

Timing Patterns

The alternating black-and-white modules between the finder patterns form timing patterns, which help the scanner determine the grid size.

Data and Error Correction

The remaining area contains the actual encoded data plus error correction codewords. The data is encoded using one of four modes:

  • Numeric mode — digits 0-9 (most efficient, ~3.3 bits per character)
  • Alphanumeric mode — digits, uppercase letters, and some symbols (~5.5 bits per character)
  • Byte mode — any 8-bit data, including UTF-8 text (8 bits per character)
  • Kanji mode — Japanese characters (~13 bits per character)

Error Correction Levels

One of the most remarkable features of QR codes is their built-in error correction using Reed-Solomon error correction. This means QR codes can still be read even if part of the code is damaged, dirty, or obscured.

There are four error correction levels:

Level Recovery Capacity Best For
L (Low)~7% damage recoveryMaximum data capacity
M (Medium)~15% damage recoveryGeneral use (default)
Q (Quartile)~25% damage recoveryIndustrial, outdoor use
H (High)~30% damage recoveryCodes with logo overlay

Level H is often used when a logo or image is placed in the center of the QR code — the error correction compensates for the "damaged" area.

Types of QR Codes

Static QR Codes

Static QR codes encode data directly. Once created, the encoded content cannot be changed. They're free to generate and don't require an internet connection to scan. Best for: permanent information like WiFi passwords, contact cards, or fixed URLs.

Dynamic QR Codes

Dynamic QR codes encode a short redirect URL instead of the final content. The destination can be changed after the code is printed, and scan analytics (location, time, device) can be tracked. Best for: marketing campaigns, menus that change, or content that needs updating.

Micro QR Codes

Micro QR codes are a compact version that uses only one finder pattern (instead of three), allowing them to be printed in very small spaces. They hold less data but are perfect for electronics or small product labels.

QR Codes vs. Barcodes

Feature 1D Barcode QR Code
Data capacity~20-25 charactersUp to 7,089 characters
Data typeNumbers (typically)Text, URLs, binary data
Error correctionCheck digit onlyReed-Solomon (7-30%)
Scan angleMust be horizontalAny angle (360°)
SizeWidth depends on dataFixed square shape

Common Uses of QR Codes

  • Payments — UPI, WeChat Pay, and Alipay all use QR codes for contactless payments
  • Restaurant menus — scan to view digital menus, especially popular since 2020
  • Event tickets — boarding passes, concert tickets, and conference badges
  • Product packaging — link to manuals, warranty registration, or product details
  • Business cards — encode contact details as a vCard for one-scan saving
  • WiFi sharing — guests scan to connect without typing the password
  • Authentication — two-factor authentication apps use QR codes to set up TOTP

How to Scan a QR Code

Most modern smartphones can scan QR codes directly with the built-in camera app. Simply point the camera at the QR code — no need to take a photo — and a notification or link will appear.

For more advanced features like scan history, batch scanning, CSV export, and barcode support, dedicated scanner apps like Scan & Generate provide additional functionality.

Frequently Asked Questions

What does QR stand for?

Quick Response. Denso Wave, a Toyota subsidiary, gave the format that name in 1994 because it was designed to be read far faster than the linear barcodes then used to track car parts along a production line.

How much data can a QR code hold?

At its largest — version 40 with the lowest error correction — up to 7,089 numeric digits, 4,296 alphanumeric characters, or 2,953 bytes. Real-world codes are far smaller, because a URL of 30 to 60 characters only needs a version 3 to 6 code, which is easier to print and quicker to scan. Our QR code capacity calculator shows exactly which version any given content needs.

Do QR codes expire?

A static QR code never expires. The data is printed into the pattern itself, so it will keep decoding to the same text for as long as the image survives. A dynamic QR code points at a redirect service instead, and stops working if that service is shut down or the subscription lapses — the difference is covered in our guide to static versus dynamic QR codes.

Can a QR code still be scanned if it is damaged?

Usually, yes. QR codes use Reed–Solomon error correction, and at the highest level roughly 30% of the symbol can be obscured, torn, or printed over while the code still reads. That redundancy is what makes logo overlays possible.

Can a QR code contain a virus?

Not directly — a QR code is only text. The risk is what that text points at: a link to a fake login page, or to a file download. The danger lives on the page you open, not in the pattern, which is why previewing the link before opening it matters. See our guide to spotting fake QR codes, or paste a scanned link into our QR code link checker.

Are QR codes free to use?

Yes. The QR code specification was published as an open standard — ISO/IEC 18004 — and Denso Wave chose not to enforce its patent rights over it. You can generate and print as many static codes as you like without paying anyone. Paid services sell tracking, editable destinations, and analytics, not the codes themselves.

Why do some QR codes have a logo in the middle?

Because error correction lets the scanner reconstruct the covered modules. A logo placed in the centre, kept within roughly the recoverable percentage and paired with a high error-correction level, leaves the code readable while making it recognisably yours.

What is the difference between a QR code and a Data Matrix?

Both are 2D codes, but they look and behave differently. A QR code has three large squares in its corners; a Data Matrix has a solid L-shaped border and a dashed edge opposite it. Data Matrix is more compact at small sizes, which is why it is used on medicine packs and electronic components — see what GS1 DataMatrix is.

Scan & Create QR Codes Instantly

Download Scan & Generate to scan any QR code or barcode, create custom codes with templates, and keep a searchable history of all your scans.