How Many QR Code Patterns? Possibility of Duplicates and Running Out

QR codes are a convenient tool for easily reading all kinds of information, but because their combination of patterns is finite, you might wonder, "Will we ever have duplicates, or could we run out?"

This article delves into the number of combinations for each QR code version and examines the actual likelihood of them overlapping or the risk of ever running out. If you want to understand the mechanics of QR codes and their potential limitations, this is a must-read.

Cover Photo

Introduction: The Question of QR Code Pattern Limits

QR codes have become deeply integrated into our daily lives, used for everything from payments and website access to information sharing. However, because each QR code has a set limit on the amount of information it can hold, it's not uncommon for questions to arise, such as "Could we run out of combinations?" or "Is it possible for two different pieces of information to create the same QR code?"

This article will explain the actual risks of QR codes "running out" or "overlapping."

The Theoretical Total Number of QR Code Patterns

The number of possible QR code patterns changes depending on its size (version), error correction level, and the type of data being stored. This section breaks down the number of patterns from the smallest to the largest QR code, based on how they are constructed.

What is a QR Code "Version"?

A QR code is composed of black and white cells, and the "version" indicates the number of these cells. There are 40 versions, from 1 to 40. As the version number increases, the QR code gets larger and can store more data.

QR Code Capacity conparing Error Correction Level

Note: The image above is a conceptual illustration showing that higher error correction levels reduce storable data capacity.

Version 1, the smallest size, is 21x21 cells. Each subsequent version increases the dimension by 4 cells, up to the largest, Version 40, which is 177x177 cells. While you need to select the right version for the amount of data you want to store, most QR code generators select the version for you automatically.

Pattern Count for the Smallest QR Code

The smallest QR code, Version 1, is made of 21x21 cells. At error correction level M, it can store 34 numeric digits.

Pattern Count for the Largest QR Code

The largest QR code, Version 40 (177x177 cells), can encode a dramatically larger amount of data. However, in reality, a very high version number results in a dense code that can be difficult for smartphones to read. It's always recommended to test QR codes on an actual device if they appear very detailed (i.e., have a high cell count/version).

For a detailed explanation of QR code versions and a list of data capacities, see here.

Will QR Codes Overlap? The Limits of Patterns and How to Handle Them

So, can a QR code pattern ever be a duplicate?

In short, yes, QR codes can overlap. If you use the exact same text string, version, and error correction level to create a QR code, you will get the exact same pattern every time.

You can try this for yourself on a free site like the one below.

Free, No-Registration QR Code Generator and Reader | QR STOCK

Is It a Problem if QR Codes Overlap?

If two identical QR codes are created, is that an issue?

The answer is no, it's not a problem at all. A QR code is simply a visual representation of a string of text. Having multiple identical QR codes is no different than writing the same word down on multiple pieces of paper.

For example, if I create a QR code for this site's URL (https://qr-stock.com) and someone else does the same, we will both generate the exact same image. This causes no issues whatsoever.

How to Avoid Creating a Duplicate Pattern

As mentioned, there is no harm in duplicate QR codes since they just represent text.

However, if for some reason you want to change the visual pattern of your QR code, you can do so by changing any of the following:

  • The text string encoded in the QR code

  • The error correction level

  • The version

Take a look at this example of how the pattern changes.

Error Correction Changes QR Code Appearance

You can also change the appearance by altering the QR code's color or adding a logo to the center.

The Possibility of QR Code Patterns Running Out

If we define "running out" as exhausting all possible combinations so no new codes can be generated, then no, the world will not run out of QR codes.

A QR code represents a string of text. Just as we don't "run out" of words or sentences, we won't run out of text to encode.

If one were to stretch the definition, you could argue that a single service might "run out" of QR codes if, for example, it decided to generate codes sequentially for the numbers "1-999." Once it reaches 999, it has exhausted its self-imposed limit.

However, it's important to note that what has been exhausted is the limited set of numbers defined by the service, not the QR code system itself.

Summary: Understanding QR Code Patterns

In this article, we've explored the total number of QR code patterns and the risks of duplicates and depletion. We've learned that a vast number of combinations are possible and that they simply represent strings of text.

Therefore, while duplicates can occur, they are not a problem. We also explained that because QR codes represent text, they are not the kind of thing that can "run out."

While there's no need to avoid duplicates, if you do want to change the visual pattern of your QR code, you can achieve this by changing the error correction level or version.

We hope this article helps you better understand QR codes. If you want to customize your QR code with images, colors, or dot shapes, consider using QR STOCK.

About the Writer

QS

The QR STOCK Editorial Team

The QR STOCK Editorial Team is a dedicated group of researchers, developers, and tech writers. We are passionate about making QR technology accessible to everyone through data-driven articles, in-depth guides, and practical tips.

Related Articles

*QR Code is registered trademark of DENSO WAVE INCORPORATED.