RandomNr

Random Barcode Number Generator

Generate EAN 13 and UPC A numbers with a correct check digit for test catalogues.

Random Barcode Number Generator

4006381333931

EAN-13, valid check digit

How many barcodes

Format

How to use the barcode generator

  1. Choose EAN-13, used worldwide, or UPC-A, common in North America.
  2. Generate one or many. Each carries a valid check digit.
  3. Copy or export the numbers for your product data.

About Random Nr's Barcode Number Generator

The random barcode number generator creates EAN 13 and UPC A numbers with a correct check digit, for test catalogues and demo products. Choose the format and generate as many as you need, and Random Nr calculates the final check digit so each number is structurally valid, while belonging to no real product.

What is the difference between EAN-13 and UPC-A

Both are retail barcode numbers built on the same GS1 system, and UPC-A is really a 12 digit special case of EAN-13 with a leading zero.

FormatDigitsWhereStructure
EAN-1313worldwidecountry prefix, manufacturer, product, check
UPC-A12North Americanumber system, manufacturer, product, check

A UPC-A number is accepted anywhere an EAN-13 is, because prefixing it with a zero produces a valid EAN-13, which is why the two coexist on the same shelves.

How the barcode check digit is calculated

The last digit of both formats is a mod 10 checksum. For EAN-13 the twelve data digits are weighted alternately 1 and 3 from the left, summed, and the check is whatever makes the total a multiple of 10. Worked on the data 400638133393:

StepResult
Weighted sum of the 12 data digits89
Next multiple of 1090
Check digit1
Full barcode4006381333931

This is the exact calculation a scanner performs the instant it reads a barcode, which is why a valid check digit is enough for testing that a system reads and accepts a code.

Why these are barcode numbers not scannable images

This tool produces the barcode number, not a printed barcode image. Pair the number with a barcode font or a rendering library to make a scannable stripe. The numbers are valid in format but assigned to no real product. For the book version of an EAN-13, see the ISBN generator.

More code and ID generators

Frequently asked questions

What formats are supported

EAN-13, the thirteen digit code used worldwide, and UPC-A, the twelve digit code common in North America.

Is the check digit correct

Yes. Both formats use a mod 10 check digit, which the tool calculates so the number validates.

Does it make a scannable image

No. It produces the barcode number itself. Pair it with a barcode font or library to render an image.

Are these real products

No. They are random valid looking numbers for testing, not assigned to any product.

Is it free

Yes, free and with no sign up.

Related generators

For a book number see the ISBN generator, or a product serial with the serial number generator.