How many unique QR codes can exist?
April 25, 2025 (updated) by @anthonynsimon
QR codes can pack in a surprising amount of information. With them popping up more and more, you might wonder if we could ever use up all the possible unique codes. It's a good question, but the sheer number of possibilities makes running out extremely unlikely.
Unique combinations of QR codes
Let's look at how many combinations are possible. A QR code is made of a grid of black and white squares called modules. The biggest standard size (Version 40) uses a 177x177 module grid.
While not all modules are used to store your data, a large code has room for many thousands of data bits. Let's use an estimate: imagine a large code can hold around 15,000 bits of information.
Since each bit can be either a 0 (white square) or a 1 (black square), the total number of different ways to arrange these bits is 2 multiplied by itself 15,000 times.
That calculation results in the total number of possible combinations.
Just how big is that number
It's tough to picture just how huge that final number really is. For comparison, scientists often estimate the total number of atoms in the observable universe to be around a 1 followed by 80 zeros.
The number of possible QR codes calculated earlier is roughly a 1 followed by 4,500 zeros.
So, there are far more potential QR code patterns (a 1 with 4,500 zeros) than there are estimated atoms in the universe (a 1 with 80 zeros). The number is so incredibly large that even with widespread global use, exhausting all unique combinations is practically impossible.
Practical limits on data storage
Okay, so there's an enormous number of potential codes. But that doesn't mean you can squeeze huge amounts of data directly into a single QR code you'd use every day.
- Code Size and Density: Smaller QR codes (like the 21x21 version) work well for simple things like website links or short text. Storing more data requires a larger QR code version with more modules. As the code gets denser, it can become harder for cameras to scan accurately, especially from a distance or in poor lighting.
- Common Uses: Larger codes can certainly handle more complex data like longer text passages, Wi-Fi network details, or contact information (vCards).
Large files are best shared via links
If you need to share something large, like a PDF document, an image file, or software, encoding the entire file directly into a standard QR code usually isn't feasible due to the size and scannability limits.
The practical solution is simple:
- Host the large file on a web server.
- Create a QR code that contains only the web link (URL) pointing to that file.
This keeps the QR code itself small, simple, and easy to scan. Plus, you can update the file on the server later if needed, without needing to change the QR code itself.
Conclusion: No shortage of QR codes
In short, we are nowhere near running out of unique QR codes. The theoretical number of combinations is astronomical. While practical factors limit how much data fits reliably into one scannable code, the system itself offers more than enough unique possibilities for any foreseeable need. QR codes remain a useful and flexible way to share information, big or small.