The number of possible QR codes is astronomically large, essentially guaranteeing an almost infinite variety of unique codes. A QR code consists of modules (black or white squares) arranged in versions from 21x21 (Version 1) up to 177x177 (Version 40). Each module can be in one of two states, so purely from a binary perspective, a Version 40 QR code with 31,329 modules can represent 231,3292^{31,329}231,329 different combinations. However, not all these combinations are valid QR codes because of fixed patterns for alignment, formatting, and error correction. The maximum data capacity also depends on the error correction level and the type of data encoded (numeric, alphanumeric, byte, Kanji).
- The largest numeric QR code (Version 40) can hold up to 7,089 numeric characters, which means 107,08910^{7,089}107,089 possible numeric strings alone.
- For typical practical purposes, with around 15,000 bits of data, the number of possible QR codes can be approximately 215,0002^{15,000}215,000, which is about 2.8×1045152.8\times 10^{4515}2.8×104515 different ways.
- Even encoding just 25 alphanumeric characters results in over 1.5 septillion (1.5 x 10^{24}) unique QR codes.
Practically, the number of QR codes is so vast it's effectively infinite for any real-world application; running out of unique QR codes is not a concern for many millions of years, if ever. If needed, adding more modules could generate even more unique codes beyond the current standard size.