Numbers
Random Barcode Number Generator
Used by developers, writers, and creators worldwide.
A random barcode number generator saves hours when you need realistic test data for retail or inventory systems. This tool produces EAN-13 and UPC-A numbers with mathematically correct check digits, calculated using the standard weighted-sum algorithm — so they pass format validation in any library or POS system without being registered to a real product. Choose your format and set the count to get a clean batch instantly. EAN-13 covers international retail outside North America; UPC-A handles US and Canadian shelves. Both formats are used directly in barcode rendering libraries like JsBarcode, python-barcode, or ZXing, making the output ready for test fixtures, seed scripts, and packaging mockups.
Loading usage…
Free forever — no account required
How to use
- Choose your options above
- Click Generate
- Copy your result
Detailed instructions
- Select EAN-13 (13 digits, global) or UPC-A (12 digits, North America) from the Format dropdown.
- Set the Count field to the number of barcode numbers you need, between 1 and your required batch size.
- Click Generate to produce the list of barcode numbers with correct check digits.
- Copy the output list and paste it into your database seed file, test fixture, spreadsheet, or barcode rendering tool.
Use Cases
- •Seeding a Postgres staging database with 500 realistic EAN-13 product records
- •Generating UPC-A fixture data for Jest or Pytest unit tests in a POS codebase
- •Testing a Shopify or WooCommerce import pipeline against valid-format barcode strings
- •Producing convincing packaging dielines and mockups in Figma without placeholder zeros
- •Stress-testing a barcode scanner integration in Cypress before a retail app goes live
Tips
- →To test check-digit validation logic, manually corrupt one digit in a generated number and confirm your code rejects it.
- →EAN-13 numbers starting with 978 or 979 are the ISBN book barcode range — avoid that prefix if you need generic retail barcodes.
- →For spreadsheet use, format the column as Text before pasting to prevent Excel or Sheets from stripping leading zeros on UPC-A numbers.
- →Combine with a product name generator to build complete fake product catalogs for demo environments or UI prototypes.
- →When seeding a database, generate 20% more barcodes than you need and deduplicate — collision probability is low but not zero at scale.
- →Python-barcode and JsBarcode both validate the check digit on import; if they accept your number without error, the check digit is confirmed correct.
FAQ
can I use these generated barcodes on real retail products
No. The numbers have correct structure and check digits, so they pass format validation, but they are not registered with GS1 or any national numbering authority. Using unregistered barcodes on real products causes conflicts with existing product records. For legitimate retail use, purchase a GS1 Company Prefix at gs1.org.
what is the difference between EAN-13 and UPC-A
UPC-A is a 12-digit format used primarily in the US and Canada. EAN-13 is a 13-digit international standard that extends UPC-A by prepending a country or prefix digit. Most modern scanners handle both interchangeably — you can convert any UPC-A to EAN-13 simply by prepending a zero.
how do I render these numbers as actual scannable barcode images
Pass the generated strings directly into a rendering library: JsBarcode for JavaScript, python-barcode for Python, or ZXing for Java and Android. Each library validates the check digit before rendering, and numbers from this generator will pass. Once rendered as bars and spaces, the image will scan on any standard barcode reader.