Random QR Code Generator

Get a random QR code to scan, or a batch of unique random codes for vouchers, tickets and labels. Everything is made in your browser.

A random code to scan

A batch of unique random codes

Every code holds a different random token, so you can tell each printed voucher, ticket or label apart. No two codes in a batch are the same.

By QRotto · Published · 5 min read

Two random QR code generators in one

People mean two different things by a random QR code. Some want a code with a surprise inside, to scan for fun, to try out a phone's camera, or to hand out in a game. Others need many codes that are all different, so each voucher or ticket can be told apart and checked once. This page does both.

In both cases the random part is the content. The black and white pattern is not random at all: the same text always makes the same pattern, in any generator. What changes from code to code is the text inside.

Random QR codes to scan

Pick what you want inside and press the button. Each press makes a new code. Scan it with your phone camera, or open Show what is inside if you want to check the answer first.

These codes hold plain text, not links, so scanning one never opens a website. That also makes them a safe way to check that a phone can read QR codes at all.

A random password in a QR code is only as private as the paper it is on. Anyone who scans it can read it. Use it for one off codes, not for an account you care about.

Unique random codes for vouchers and tickets

The batch tool makes as many as 1,000 codes at once, each holding a different random token such as K7fwQm2xTe. Put your own web address in front, for example https://example.com/v/, and each code opens that address with its own token on the end. Your website looks the token up and decides what happens: show a ticket, apply a discount, or say the voucher was already used.

  1. Choose how many codes you need, and how many characters each token gets.
  2. Add your web address if the codes should open a page. Leave it empty for plain tokens that your own app reads.
  3. Make the batch, then download the list as a CSV for your records and the codes as PNG images in a ZIP.
  4. Need SVG or a PDF sheet? Press Copy list, open the Bulk QR code generator and paste it in. Each code keeps its token as its label.

The codes on their own are only half of a voucher system. Something has to remember which tokens exist and which have been used. Our guide on how random QR codes work covers that part, and measures how token length affects duplicates and guessing.

Which settings to choose

Longer tokens are harder to guess, and they cost almost nothing in print size, because a few extra characters barely change the code. The tool shows the exact numbers for your settings after you make a batch.

UseCharactersWhy
Raffle or game among friends6Nobody is trying to cheat
Discount vouchers10Guessing one is impractical
Event tickets, warranty labels12 or moreWorth money, so make guessing hopeless
Codes people may type by hand8 to 10, easy to read setNo 0 and O, or 1, I and l, to mix up

How random is it?

Every random choice on this page comes from crypto.getRandomValues, the browser's random number source built for security. It does not use Math.random, which browser documentation says is not suitable for anything security related. Each character is picked so that every character in the set is equally likely, with no bias towards the start of the alphabet.

Nothing is sent anywhere. The tokens are made on your device, the codes are drawn on your device, and we never see them. That also means we cannot recover a batch for you, so download the CSV before you close the page.

Frequently asked questions

Is it safe to scan a random QR code?

The codes from this page are safe: they hold plain text, or the web address you typed yourself. A random code you find on a poster or in a message is a different matter, because it can point anywhere. Read it first with our QR code scanner, which shows the contents before anything opens.

Can I make one QR code that opens a random website each time?

Not with a static code. A static code always holds the same content, so it opens the same address every time. To get a different result on each scan, the code has to point at a web page that picks something at random, and that page has to live on a server you run.

Can two codes in a batch be the same?

No. If the random draw ever repeats a token, the tool throws the copy away and draws again, so every code in the batch is different. Separate batches are not checked against each other, so keep your CSV and use long tokens if you make more than one batch.

Do these codes expire?

No. They are static codes, so the content is inside the code itself and there is nothing to expire. A code with a web address keeps working for as long as that address does.

How big should I print them?

The scan check under each code gives the smallest safe print width. For most batches that is about 2 cm (0.8 in). Our guide to QR code size for print explains the rule.

Related tools

For many codes with your own content, use the Bulk QR code generator. For a single message, the Text QR code generator is simpler. To read a code before you trust it, use the QR code scanner.

QRotto

QRotto builds free browser based QR code generators and writes the guides that go with them. Every generator is verified by decoding the codes it produces and confirming the output matches the input exactly. See our editorial standards.