QR code test data generator

The payloads, not the pictures. This page generates the STRING that goes inside a QR code — the part your scanner hands back to your application — in the shapes that find bugs: capacity boundaries, character sets, invisible whitespace, and the strings a badly written integration will execute instead of display. The symbol itself is a solved problem; what you do with its contents is not.

Every payload is encoded here, with this site's own ISO/IEC 18004 encoder, at the error-correction level you choose. That matters more than it sounds: a boundary case that is never encoded proves nothing. Generate the maximum-capacity payload and the page reports the version and module count it fits in; generate one byte more and the encoder refuses it in its own words, which is exactly the assertion a boundary test exists to make.

The counts make the invisible visible. A payload is shown with its character count and its byte count, and the two are not the same number — one emoji is a single character and four bytes, and a leading run of spaces is impossible to see but trivial to count. UTF-8 length is what a QR code's byte mode actually stores, so a suite that reports only characters will mislead you about capacity at exactly the moment it matters.

The hostile scenarios are the point of the exercise. Script tags, image tags with error handlers, quote-breaking attribute fragments and the classic SQL tautology are all offered as ordinary payloads, because a QR code is an untrusted input channel and a scanner that renders its contents as markup is a vulnerability with a camera attached. They encode as data here, and are displayed as text, which is the behavior to hold your own reader to.

Nothing is generated until you press the button, nothing is uploaded, and anything generated can be copied in one click. If you want the images rather than the strings — valid codes across all forty versions, corrupted symbols, degraded photographs, each labeled with whether it still decodes — that is the test-suite builder on the QR code generator page.

Open the generator → · All formats