Barcode Number Example Generator
Generates a 12-digit UPC-A-shaped example number for mockups and test data, with the twelfth digit computed as the check digit for the eleven before it — so a scanner or a validator accepts it instead of rejecting the whole fixture.
What this generator does
Produces a numeric string in the shape of a retail barcode, for testing scanning workflows and filling product mockups. It is a structurally plausible number rather than a registered one.
How to use this tool
- Press generate for an example barcode number.
- Generate again for another one.
Worked examples
- Format
- 012345678905 — twelve digits, the length of a UPC-A, the last of them the check digit
- Why the last digit matters
- Alter any single digit and the check fails, which is what a scanner uses to reject a misread and what makes a generated number usable as a fixture.
Common use cases
- Mock retail/inventory test data
- UI/UX mockups needing a product identifier
- Teaching barcode formatting
How this generator works
Eleven digits are drawn at random and the twelfth is computed from them by the three-and-one weighting UPC-A uses — the same sum a scanner performs to reject a misread. Until this page was corrected it made exactly that claim while emitting twelve random digits, which is the classic bad test fixture: it looks right, and every scanner and validator refuses it.
Limitations and good to know
- The company prefix in a real barcode is allocated by GS1. A generated number is not registered to anyone and would not resolve to a product.
- Fictional numbers for documentation and test data. They are registered to nobody and identify no product.
- A valid check digit does not make the number real. Real allocations come from a numbering authority, and a correct check digit means only that the digits are internally consistent.
- Twelve digits is a UPC-A, not the thirteen of an EAN-13. The two use different check-digit weightings, so a UPC-A padded with a leading zero is an EAN-13 but a UPC-A truncated from one is not.
- The country or company prefix is drawn like everything else, so it may belong to a real allocation while the rest of the number does not.
This is a formatting example only, never a real, assigned barcode for any product.
Related generators
- ISBN Example GeneratorAn ISBN-13-shaped example number with a correct check digit, for test data that has to pass validation.
- SKU GeneratorGenerate a fictional SKU (stock-keeping unit) example code — for mockups and test data.
- Check Digit Identifier GeneratorTest-data identifiers that pass their own check — IBAN, VIN, IMEI, EAN, UPC, routing and VAT numbers — each with the arithmetic that produced its check digit written out.