Use test mode to vary what a scanner reads, or ID mode to create a compact label value. Sample links use reserved example domains rather than arbitrary businesses. Generation happens locally, and the decoded content remains visible so you know exactly what each code contains.
Which random QR code do you need?
Test mode is for developers, quality checks and mockups. It lets you try different payload types and see whether a reader recovers the exact content. A URL should be recognized as a link; a WiFi sample should be recognized as network information where the scanner supports that format. Successful image decoding and successful interpretation are separate results.
Random ID mode creates a value you can attach to an item in your own records. A prefix such as INV- or EVENT- makes the purpose recognizable outside the scanner. The code does not create an inventory system, register an attendee or look up a product by itself. It gives your system a value to record.
Choose the mode deliberately. A fake contact in a design mockup should not be mistaken for a staff member's real details. An inventory identifier should not point to an example website when the receiving app expects plain text. The payload preview helps you confirm that choice before exporting.
A random QR code for testing scanners and apps
A fixed sample can hide assumptions in a test harness, such as accepting a known value without checking the actual decoder result. Fresh content helps expose those mistakes. Compare the complete returned string with the generated string, including punctuation, Unicode and line breaks. A reader that opens something is not necessarily returning every byte correctly.
Build a small test matrix before a large one
QR versions range from 1 through 40, with 21 to 177 modules on each side. Higher versions contain more modules, and payload capacity depends on content type and error correction. A small version cannot hold every payload: if the selected combination does not fit, shorten the content or choose a larger version rather than treating the encoding error as a scanner failure.
Start with a plain black-and-white code and one payload type. Then vary one factor at a time. This makes failures easier to explain than changing color, size, content length and correction simultaneously. Record the phone or scanner model, software version, viewing distance and light alongside the result.
- Try several versions, such as 1, 10, 25 and 40, using payloads that fit each selected capacity.
- Compare L and H correction, then add intermediate levels if your product needs them.
- Test a small printed size and a larger one, keeping the quiet zone intact.
- Compare black-and-white with your actual brand colors; test reversed colors separately if you plan to use them.
- Read both a screen display and a final printed sample, and compare the exact decoded payload.
Use a seed to repeat a test, not to create a secret
A seed makes a test sequence deterministic for the same settings and implementation. Save the seed with the payload type, length, version and correction level so another tester can reproduce the conditions. Save the exported payload as the most direct evidence too; implementation changes can affect how a future version interprets settings.
When you leave the seed empty, generation uses the browser's cryptographic random-value facility. Entering a seed switches to a repeatable test path, which is intentionally predictable. These are different promises. Reproducible test data should not be presented as a fresh secret merely because it looks random on screen.
MDN: Crypto.getRandomValuesWhy test links use reserved example domains
IANA maintains example.com and example.org for documentation, and .example is reserved for examples. These are suitable names for illustrating a URL without selecting an unrelated person's business or guessing a random live domain. The example.com and example.org hosts are real websites with explanatory content, while an arbitrary .example hostname normally will not resolve publicly.
A sample path may return an example page, an error or no page, and IANA does not provide a production availability guarantee for these web services. That does not make the QR pattern invalid. For a decoder test, compare the recovered URL rather than requiring a successful web request to an example host.
WiFi samples use an obvious test network name, and contact samples identify a fictional test person. They are not invitations to join an actual network or contact a real customer. Keep test artifacts labeled when they leave your development screen, particularly in presentation decks and printed mockups.
IANA: example domains and their limitsRandom QR code IDs for labels and inventory
A short identifier is useful when the item record lives elsewhere. For example, INV-7KQ9M2XA can be printed on a storage box and entered into your inventory sheet. The prefix describes the collection; the random portion distinguishes a record. Keep the human-readable identifier beside the pattern so a damaged label can still be typed manually.
The ID alphabet avoids the easily confused characters I, O, 0 and 1. With 32 possible characters, a six-character suffix has 32⁶, or 1,073,741,824, possible values. Eight characters have 1,099,511,627,776 possibilities. More possibilities reduce collision risk, but no finite random space guarantees that every independently generated value will be new.
For 10,000 independent uniformly selected eight-character suffixes, the approximate chance of at least one repeated pair is 0.00455%, before any duplicate rejection. That is a probability illustration, not a promise of uniqueness across your files. Compare each new batch with your existing ledger and reject duplicates in the system that assigns the IDs.
Save the mapping between the identifier and the physical item. A QR code does not remember which box you stuck it on, and PactQR does not maintain a central registry. If several team members generate labels, a shared assignment record is more important than assuming that chance alone will keep the records clean.
A random QR code is not private
Anybody who can photograph the code can read and copy its value. Randomness can make a value difficult to guess, but it does not prevent sharing a visible value. Do not treat an ordinary label as a password, identity proof or admission credential solely because it has many possible combinations.
A voucher or ticket system needs a separate authority that checks validity and, where appropriate, records redemption. A screenshot can duplicate a printed code perfectly. If you are testing such a system, use dummy values and a test environment. This generator does not sign tickets, enforce one-time use or decide whether a person should be admitted.
Read the destination before opening an unfamiliar code
Use a reader that previews the recovered content. Confirm the hostname before following a URL, especially if the page asks for sign-in, payment or a download. A code printed over another sticker may have a different owner from the surrounding sign. Appearance alone does not establish who controls the destination.
For codes generated in this page's test URL mode, the preview should show one of the reserved example destinations. Plain-text IDs have no website to open. The pattern stays fixed after generation: scanning it repeatedly returns the same payload. Regenerating creates new content; it does not make an already downloaded image rotate between destinations.
Use the general URL generator when you are ready to replace a test destination with an address you control. Create a QR code for your real website