Q
QRLifetime
Codes never expire
Log in
EN DE FR ES

EAN-13 Barcode Generator

Generate a retail-standard EAN-13 barcode from your 13-digit GTIN. Free PNG and SVG download, no login required.

Symbology
Valid length for EAN-13 (13 digits).
Color
Symbology: EAN-13

About EAN-13

EAN-13 (European Article Number) is the worldwide standard for product identification at retail point of sale. It carries a GTIN-13: twelve digits made of a GS1 Company Prefix and an item reference, followed by a check digit that lets any scanner verify the number was read correctly.

How the 13 digits are split

The boundary between the company prefix and the item reference is not fixed. GS1 issues prefixes of different lengths: a company that needs thousands of product numbers gets a short prefix, one that needs a handful gets a long one. That is why you cannot tell, from the number alone, where the company ends and the product begins.

Digits Part Who decides it
1 – 3 GS1 prefix GS1, when your company registers
up to 12 Company prefix, then item reference GS1 for the prefix, you for the item
13 Check digit Arithmetic — see below

The prefix is not the country of origin

This is the most common misreading of a barcode, and it has consequences for anyone sourcing products. GS1 is explicit: the prefix does not indicate that a product was manufactured in a given country — a GS1 member can manufacture anywhere in the world. What the first digits identify is the GS1 member organisation that issued the number, which usually reflects where the company registered, not where the goods were made.

Two prefixes are worth knowing because they are not product prefixes at all: 978 and 979 are reserved for books, which is how an ISBN travels as a normal retail barcode. If you are encoding a book, use the ISBN generator instead.

Computing the check digit, step by step

Take the first 12 digits, multiply them alternately by 1 and 3 starting with 1 on the left, add the results, then add whatever is needed to reach the next multiple of 10. Worked example with 400638133393:

digit   4  0  0  6  3  8  1  3  3  3  9  3
weight  1  3  1  3  1  3  1  3  1  3  1  3
product 4  0  0 18  3 24  1  9  3  9  9  9

sum = 89
next multiple of 10 = 90
check digit = 90 − 89 = 1      →  4006381333931

One trap: this is the GS1 mod-10 scheme, not the Luhn algorithm used for bank cards. Luhn doubles every second digit from the right and subtracts 9 from any result above 9; mod-10 does neither. Feeding a GTIN to a Luhn validator will reject valid numbers. If a barcode refuses to generate here, the 13th digit is the first thing to check.

Do you need a real GTIN?

If the product is sold through retailers or major marketplaces, yes: the number must be issued by GS1, because the buyer's systems resolve it against the GS1 registry. For internal stock control, a prototype, a demo or a test fixture, any 13-digit sequence with a correct check digit scans perfectly — it simply means nothing outside your own systems.

← All barcode formats

Frequently asked questions

How is the EAN-13 check digit calculated?

Multiply the first 12 digits alternately by 1 and 3, starting with 1 for the leftmost digit, and add the results. The check digit is whatever must be added to reach the next multiple of 10. This is the GS1 mod-10 scheme, not the Luhn algorithm used for bank cards — the two give different results.

Do I need to buy a GTIN to sell a product?

Yes, if you sell through retailers or major marketplaces. Real EAN-13 numbers are issued by GS1 for an annual fee, and the country prefix identifies the issuing GS1 member organisation. For internal stock control, testing or demos you can use any digit sequence with a valid check digit.

What size should an EAN-13 barcode be printed at?

The GS1 nominal size is 37.29 × 25.93 mm. Retail scanners accept 80 % to 200 % of that, so between roughly 29.8 mm and 74.6 mm wide. Below 80 % the bars get too narrow for laser scanners at the till. Print from the SVG, never a scaled-up PNG.