Invalid QR code generator

Codes that are supposed to fail. Corrupted data, format information declaring the wrong mask, a broken finder pattern, an inverted symbol — each one run through a real decoder and labeled with whether it still reads, because a broken code with no label tells a tester nothing.

Why an invalid code needs a label

A corrupted QR code has two possible meanings and they call for opposite reactions. Either the damage is inside what error correction can repair, in which case a scanner that fails is weaker than the specification requires — or the damage is past that limit, in which case a scanner that returns text is guessing, which is worse.

From the outside those two cases look identical: a broken picture of a code. So a directory of corrupted images is not a test set. Every case here is decoded with real Reed-Solomon correction and labeled, and the label goes in the filename as well as the manifest, so a failing test tells you which of the two situations you are in without opening anything.

What gets broken

The error-correction trade, measured

The four levels are usually quoted as percentages, which is accurate and hard to act on. Measured on a version 3 symbol carrying a URL, the number of modules that can be flipped while the code still reads is 7 at level L, 14 at M, 27 at Q and 37 at H.

That is the same trade the percentages describe, in a unit you can reason about: level H survives roughly five times the damage of level L, and costs capacity to do it. The corpus spans both outcomes at every level, so the point where your own reader gives up is something you measure rather than assume.

What the labels are, and are not

Every verdict comes from this site's own decoder, written from ISO/IEC 18004. It is a conforming reader and it is one reader. A phone camera may recover an image this decoder rejects, because it binarises more aggressively; it may also give up on a damaged finder this decoder tolerates, because it has to find the symbol in a photograph first.

So a disagreement between your scanner and a label is worth investigating rather than being a defect on either side. What the labels do give you is a set of fixtures whose expected outcome is known, reproducible from a seed, and explained in a manifest.

Using them

The download is a ZIP of images plus a CSV and a JSON manifest recording, per file, what was damaged, how many modules changed, the verdict, and how many codewords error correction had to repair. An undamaged control goes in first, because without a baseline you cannot tell a strict scanner from a broken corpus.

A seed makes the set reproducible, which is what lets you attach one to a bug report and have somebody else regenerate exactly the same bytes. Nothing is uploaded; the files are built in your browser.

Questions

Why would I want a QR code that does not work?

To test the path your software takes when a scan fails. That path is usually less tested than the success path, and it is the one a user meets when a label is scuffed or a screen is dirty.

How do I know which ones should read?

The filename ends in -reads or -fails, and the manifest gives the full detail. The -reads cases are inside the error correction the standard requires; the -fails cases have lost more data than can be recovered.

My scanner reads one marked fails. Is that good?

No. That code has lost more data than error correction can recover, so a reader returning text for it is guessing. Guessing is worse than failing, because the caller cannot tell.

My scanner cannot read one marked reads. Is that a bug?

Possibly. It means your reader recovers less than the specification requires for that level, or it cannot locate the symbol. Worth checking against the undamaged control first.

Are the files the same every time?

Yes, for a given seed. The same seed and the same content produce byte-identical files, so a fixture can be regenerated later.

Open the testing toolkit →

Make a different kind of code

Damaged QR code generator · QR code testing tool · Free QR code generator · QR code generator for a URL · Wi-Fi QR code generator · vCard QR code generator · QR code generator · Bulk QR code generator

Open the generator → · All formats