How to make an EAN-13 barcode
- Type your product number. With 12 digits, the 13th check digit is added; with 13, the last digit is verified.
- Look at the message under the field: it shows the calculated digit or points out a typo and offers the fix.
- Download the barcode as SVG for your packaging designer or PNG for labels, or make a ZIP from a list.
What EAN-13 is
EAN-13 is the barcode on the back of most consumer products sold outside the US and Canada: food, books, cosmetics, electronics. The 13 digits under the bars are a GTIN-13, a global trade item number that identifies one specific product in one specific packaging. At the checkout, the scanner reads the number and the store's system looks up the name and price. The barcode itself holds only the number, nothing else.
How the 13 digits are built
| Part | Meaning |
|---|---|
| First 2 or 3 digits | GS1 prefix: shows which national GS1 office issued the number, not the country where the product was made |
| Middle digits | Company prefix and item reference assigned to the brand owner |
| Last digit | Check digit calculated from the first 12 |
Books use prefixes 978 and 979, since an ISBN-13 is also a valid EAN-13. If you have an ISBN, enter it without hyphens and you get the familiar book barcode.
Calculating the check digit
The check digit protects against misreads and typos. To work it out by hand, take the first 12 digits, multiply the digits in even positions (2nd, 4th, and so on) by 3 and the others by 1, and add everything up. The check digit is the number you add to reach the next multiple of 10.
Example: for 400638133393 the weighted sum is 89, and the next multiple of 10 is 90, so the check digit is 1 and the full number is 4006381333931. Enter the 12 digits in the tool and it shows exactly this. If you paste a 13-digit number with a wrong last digit, you'll see what the digit should be.
Getting a real EAN number
An EAN code is only useful in retail when the number is registered to your company. Brand owners get a company prefix by joining their national GS1 organization, then assign item numbers to each product and variant (size, flavor, pack count). Retailers and many online marketplaces check numbers against GS1 data, so inventing digits, or buying cheap resold numbers, can get listings rejected. This page draws the barcode image; it can't make a number official.
Printing EAN-13 on packaging
- Keep the white margins, especially on the left: the light area before the first bar is part of the symbol.
- Dark bars on a white or light background scan best. Avoid red bars; the tool warns about color choices that scanners struggle with.
- Don't shorten the bars to save space; truncated codes are harder to scan at a busy checkout.
- Give your designer the SVG. It is vector, so the bars stay crisp at any size on the print proof.
Selling in the US or Canada? Many retailers there also scan EAN-13, but if you need the 12-digit version, see the UPC Barcode Generator. For your own stock labels, Code 128 is simpler.
More ways to use this tool
Frequently asked questions
Should I enter 12 or 13 digits?
Either. Enter 12 and the check digit is calculated and added. Enter all 13 and the tool checks that the last digit is correct.
Does the first digit show the country of origin?
No. The prefix shows which GS1 member organization issued the number. A product with a German prefix can be made anywhere.
Can I make an EAN-13 from an ISBN?
Yes. Enter the 13-digit ISBN (starting with 978 or 979) without hyphens.
What is EAN-8?
A shorter 8-digit version for packages too small for EAN-13, such as a lip balm. You can choose EAN-8 from the barcode type list; its numbers are also issued by GS1.
Is the number I type sent to you?
No. The barcode is drawn in your browser and nothing is sent to a server.