keepcalculator

06 Numbers and Powers

QR Codes Running Out? The Real Answer

Card No. 06·85665 · Updated · Standard formula, shown below

No, we are not running out of QR codes. The number of possible QR code versions is so large that, even with billions scanned daily, it would take an astronomically long time to exhaust them all. This article explains why that is, how QR codes work, and what limits (if any) actually exist.

How QR Codes Store Data

QR codes are two-dimensional barcodes that store data in a grid of black and white squares. The data is encoded using a Reed-Solomon error correction algorithm, which allows the code to be read even if partially damaged or obscured. Each QR code has a version number (1 to 40) that determines its size, and each version has four error correction levels (L, M, Q, H) that trade off data capacity for robustness.

The key to the “running out” question is the number of possible combinations. For a version 40 QR code, there are 177×177 = 31,329 modules. Even after subtracting the fixed patterns, the number of possible combinations is roughly 2^23,000 – a number so large that it dwarfs the number of atoms in the observable universe (about 10^80).

Why We Won’t Run Out

To put it in perspective: if every person on Earth (about 8 billion) generated a new QR code every second for the next 10,000 years, the total number of codes used would be about 2.5×10^21. That is still far less than the number of possible QR codes for a single version 40 code alone. Even if we used only the smallest version (v1) with its ~2^208 possible combinations, we would run out only after 10^50 years – much longer than the age of the universe.

Why do people worry? Because QR codes are often generated with a limited set of characters (like URLs) and sometimes use a fixed payload. But the QR code standard itself allows for a huge variety of data, and even a simple URL can be encoded in many ways (different error correction levels, masks, etc.). The fear is unfounded.

Common Misconceptions

  • “QR codes are running out because they’re all being used for COVID check-ins.” – Even if every person on Earth checked in once a day for a year, that’s only ~3×10^12 codes – a drop in the ocean.
  • “Each QR code is unique and can’t be reused.” – QR codes can be reused; they are just data. The same code can be scanned multiple times. The concern is about unique codes, but the supply is effectively infinite.
  • “The QR code standard is limited to 40 versions.” – True, but version 40 is already huge, and the standard could be extended if ever needed (though it’s not).

How to Choose a QR Code Size

When generating QR codes, you typically don’t need to worry about running out. Instead, you choose a version and error correction level based on your data length and scanning conditions:

  • Data length: More data requires a larger version. For example, a URL like “https://example.com” fits in a version 2 or 3 code.
  • Error correction: Higher levels (H) allow more damage but reduce capacity. For clean printing, level M is common.
  • Scanning distance: Larger codes can be scanned from farther away. A v1 code is fine for a phone screen; a v10 might be needed for a poster.

QR Code Capacity and Limits

The real limit is not the number of codes, but the data capacity of a single code. The maximum data capacity of a version 40 QR code is:

  • Numeric: 7,089 characters
  • Alphanumeric: 4,296 characters
  • Binary: 2,953 bytes
  • Kanji: 1,817 characters

These limits are set by the standard and are independent of the number of possible codes. So while you can’t run out of QR codes, you can run out of space in a single code if you try to store too much data.

QR Code Safety and Security

While the supply of QR codes is infinite, the security of QR codes is a real concern. Attackers can create malicious QR codes that lead to phishing sites or download malware. Always verify the URL before scanning, especially if the code is in a public place. Use a secure QR scanner app that shows the URL before opening it.

Alternatives to QR Codes

If you need a different format, there are alternatives:

  • Data Matrix: Similar to QR but used mainly for small items like electronic components.
  • Aztec Code: Used in transport tickets, can be read from a phone screen.
  • PDF417: A stacked linear barcode used for IDs and boarding passes.
  • RFID/NFC: Not visual, but can store more data and be read wirelessly.

However, QR codes remain the most widely supported and easiest to scan with a smartphone camera.

Frequently Asked Questions

Can a QR code be duplicated?

Yes, a QR code is just data. If you print the same code twice, both are valid. This is not a problem for most uses, but for security-sensitive applications like payment, unique codes with dynamic data are used.

How many QR codes have been used so far?

No exact count exists, but even if every person on Earth generated one per second for a year, it would be about 2.5×10^17 – still a tiny fraction of the possible codes for version 1 alone.

What happens if we use up all QR codes?

We won’t. The number is so large that it’s effectively infinite. Even if we used all 40 versions and all error correction levels, we would still have more than enough for any conceivable future use.

Is there a limit to how many QR codes I can generate?

No. You can generate as many as you want, but each code has a data capacity limit. For most uses (URLs, text), you’ll never hit that limit.

Do QR codes expire?

No, a printed QR code doesn’t expire. However, the URL it points to might become invalid. The code itself is just a data carrier.

Can QR codes be scanned without a smartphone?

Yes, but it’s rare. Some feature phones have QR readers, and dedicated scanners exist. But the vast majority of scans are done with smartphones.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →