Skip to main content
QRSenBuilt for business
How Many Possible QR Codes Are There? The Real Math Behind QR Capacity — QR code guide cover illustration
Guides

How Many Possible QR Codes Are There? The Real Math Behind QR Capacity

4 min readSeptember 3, 2026By Editorial Team
QR Code Facts Technical

There's no single fixed number, because QR codes come in 40 different sizes ("versions"), but even the smallest version (21×21 modules) has roughly 2^400 possible black-and-white patterns — a number so large it dwarfs the estimated number of atoms in the observable universe. The largest version (177×177 modules) has a number of possible arrangements too large to be practically meaningful. In short: it is not possible to run out of QR codes.

Why this question doesn't have one clean number

QR codes aren't a fixed grid size — the spec defines 40 "versions," ranging from a 21×21-module grid (Version 1) up to a 177×177-module grid (Version 40), with the version automatically chosen based on how much data is being encoded and how much error correction is applied. Each module is binary (black or white), so the raw number of possible visual patterns at a given version is 2 raised to the power of the total module count.

At Version 1, that's roughly 21 × 21 = 441 modules, though a meaningful chunk of those are reserved for fixed structural elements (finder patterns, timing lines, format information) rather than free data bits — still, even accounting for that, the usable pattern space is on the order of 2^400, a number with well over 100 digits. At Version 40, the module count exceeds 31,000, putting the theoretical pattern space so far beyond any comparison that the number itself stops being meaningful to reason about directly.

Putting the scale in perspective

Comparison point Approximate value
Estimated atoms in the observable universe ~10^80
Possible patterns at QR Version 1 alone (2^400-ish) ~10^120
Estimated grains of sand on Earth ~10^20
Number of QR codes ever generated by humanity (rough estimate) Nowhere close to exhausting even Version 1's space

The takeaway: even restricting the question to the smallest, simplest QR code size, the space of possible patterns is larger than the number of atoms in the observable universe. Every larger version multiplies that already-incomprehensible number further. There has never been, and will never realistically be, a practical risk of "running out" of distinct QR code patterns.

What actually limits a QR code isn't the pattern space

The real-world constraint on QR codes has nothing to do with running out of possible patterns — it's about how much data you're trying to encode and how large the resulting code needs to be to hold it reliably. See our glossary entry on QR code character capacity for the practical numbers: roughly 2,953 bytes of general text at the absolute maximum size and lowest error correction, though almost nothing encoded in practice comes close to that ceiling.

In other words, the interesting engineering question isn't "will we run out of QR codes" (we won't, by an almost incomprehensible margin) — it's "how much data can I fit before the code gets too dense to scan reliably at the print size I need," which is a completely separate, much more practical question covered in our guide on static vs. dynamic QR codes and why QR codes fail after printing.

Could two different QR codes ever collide (look identical) by accident?

Only if they encode the exact same data with the exact same version and error-correction settings — the pattern is a deterministic function of the input, not a random draw from the pattern space. Two different QR codes encoding different URLs will essentially never produce the same visual pattern, because the encoding algorithm is designed to spread differences in input data across the entire grid, not just a few modules.

Quick answers

Will QR codes ever "run out"? No — the number of possible patterns, even at the smallest QR code size, vastly exceeds the number of atoms in the observable universe. This isn't a realistic constraint at any scale of human use.

Is a QR code's pattern random? No — it's a deterministic encoding of specific data (a URL, text, contact details) combined with error-correction bits, following the QR specification's math. The same input with the same settings always produces the same pattern.

Does a bigger QR code hold exponentially more data? Yes, roughly — each larger version adds more modules, and the practical data capacity grows accordingly, though print-size and scan-distance constraints usually matter more than the theoretical ceiling. See how many characters a QR code can actually hold for the real-world numbers.

Why does this matter if it's just theoretical? It doesn't change how you'd use a QR code day to day — but it does explain why generating a static QR code is always free and unrestricted on QRSen's generator: there's no scarce resource being allocated, unlike, say, IPv4 addresses.

Ready to create your QR code?

Free, unlimited, no sign-up. Lifetime guarantee.

Open QR Generator