How to Generate an EAN-13 Barcode for Your Products

What Is an EAN-13 Barcode?

EAN-13 (European Article Number, 13 digits) is the most widely used retail barcode format in the world outside North America, and it's recognized by point-of-sale systems in almost every country. If you've ever bought a packaged product from a store, the barcode on it was very likely an EAN-13. Its close cousin in the United States and Canada is UPC-A, which is technically a 12-digit subset of the same numbering system.

Understanding the Structure of an EAN-13 Number

An EAN-13 number is made up of 13 digits split into a few meaningful sections: a 2-3 digit GS1 prefix identifying the country or region of the issuing organization, a manufacturer code assigned to your company, a product code that your company assigns to a specific item, and a final check digit used to verify the number was entered or scanned correctly.

Where Do You Get a Valid EAN-13 Number?

To sell a product through most major retailers, you generally need a GTIN (Global Trade Item Number) issued through GS1, the global standards organization responsible for allocating these numbers. GS1 assigns your business a unique manufacturer prefix, and from there, you assign your own product codes underneath it. If you're only using barcodes for internal purposes rather than public retail sale, you can technically generate a structurally valid EAN-13 without an official GS1 registration, but it will not be a globally unique, recognized product identifier.

How the Check Digit Works

The final digit of an EAN-13 barcode is a check digit, calculated from the twelve digits before it using a weighted algorithm: digits in odd positions are multiplied by 1, digits in even positions are multiplied by 3, the results are summed, and the check digit is whatever number rounds that sum up to the next multiple of 10. This calculation lets scanners instantly detect if a barcode was misread or mistyped, since a single incorrect digit will almost always produce an invalid checksum. Our barcode generator calculates and applies this digit automatically.

Step-by-Step: Generating Your EAN-13 Barcode

Open the Barcode Generator, enter your 12 or 13-digit number in the value field, and select "EAN13" from the format list. If you enter 12 digits, the correct check digit is calculated and added automatically; if you enter all 13, the tool will validate that the check digit is correct. Adjust the line color and bar height under "Edit options" if needed, generate the barcode, and download it as a PNG image ready for your packaging design.

Formatting and Printing Considerations

EAN-13 barcodes have minimum size and quiet zone requirements to scan reliably at retail checkout — shrinking a barcode too far or cropping the white space around it are common causes of scan failures at the register. Whenever possible, follow your printer's or packaging supplier's barcode placement guidelines, and always test a printed sample with an actual barcode scanner before finalizing a full print run.

Common Mistakes to Avoid

The most frequent EAN-13 issues are using a manufacturer prefix you don't actually own (which can cause conflicts with another company's product), miscalculating the check digit manually instead of letting a generator compute it, and printing the barcode too small or with poor contrast. Double-checking your numbers and testing before mass production will save you costly reprints later.

Generate your EAN-13 barcode now

Create a print-ready EAN-13 barcode for your product in seconds.