How are QR codes unique? Can two things have the same QR code?

There are billions of QR codes already active. Now, when an app creates a new QR code, does it run some kind of a check against all active QR codes to ensure that its new QR code is absolutely unique and doesn’t already exist?


great question! i’ve thought this about barcodes too

QR codes don’t have to be unique. Apps/tools used to generate them have no idea whether any code is unique or not.

This may sound counterintuitive but there’s no central database of QR codes. When a QR code is generated, there is no check against all existing ones. As far as I know there is no repository store of all QR codes generated thus far.

1 Like

Does that mean a QR code could send me to unintended link? I mean if we don’t know they’re unique then that mistake could happen?

No, there’s no check against all existing qr codes. As another user pointed out, there doesn’t exist any repository of all qr codes created till date (that number will run into billions, of course).

As for your original question, yes. theoretically it’s possible that two things can have the same QR code, but the probability of that happening is extremely slim. You will notice that not all qr codes look the same, some are big, some are quite small. Some take you to a URL, while some present a static information, like a picture or a text. These are different types of QR codes - static and dynamic.
There’s also excellent error correction embedded in a qr code, which ensures that it can be scanned even if part of it is damaged. This means that even if two QR codes are similar, they may still encode different information.

In addition to all that, it also depends on the specific app creating the QR code. It may incorporate logic to ensure uniqueness within their own systems.

So, it’s highly unlikely to have the same qr code for two different things.