EAN Barcode Generator

Generate a scannable EAN-13 barcode from a 12 or 13-digit number.

How to Use

Enter a 12-digit EAN base number, the checksum digit is calculated and appended automatically, or paste in a full 13-digit number if you already have one with its check digit included. The barcode preview updates live as you type, ready to download as a PNG for packaging mockups, inventory labels, or product documentation. The default example, base number 590123412345, calculates out to the full code 5901234123457, worked through step by step below.

How the EAN-13 Check Digit Is Calculated

Starting from the 12-digit base 590123412345, the algorithm assigns alternating weights to each digit reading left to right, positions 1, 3, 5, 7, 9, and 11 each get multiplied by 1, and positions 2, 4, 6, 8, 10, and 12 each get multiplied by 3. Working through it: (5x1) + (9x3) + (0x1) + (1x3) + (2x1) + (3x3) + (4x1) + (1x3) + (2x1) + (3x3) + (4x1) + (5x3) adds up to 83. The check digit is whatever number brings that total up to the next multiple of 10, since 83 needs 7 more to reach 90, the check digit is 7, making the complete, correctly checksummed code 5901234123457, exactly what displays beneath the barcode's bars.

What the Leading Digits (GS1 Prefix) Represent

Unlike UPC-A's single leading number-system character, EAN-13's first two or three digits form a GS1 country prefix, identifying which national GS1 member organization issued the manufacturer their code. This tool's default example, starting with 590, falls in the range issued by GS1 Poland. Other well-known ranges include 690 through 699 for GS1 China, 890 for GS1 India, and 500 through 509 for GS1 UK, among dozens of others covering the rest of the world. See the FAQ below for an important caveat, this prefix identifies who issued the number administratively, it doesn't reliably indicate where a product was actually manufactured.

EAN-13 vs UPC-A, Briefly

EAN-13 and UPC-A share the same underlying GS1 numbering system and a closely related checksum algorithm, differing mainly in digit count and regional convention: EAN-13 is the 13-digit format used across most of the world, UPC-A is the 12-digit format standard specifically in the US and Canada. Any UPC-A code becomes a valid EAN-13 code just by adding a leading 0. If you're generating a barcode specifically for a North American product, this site's dedicated UPC generator walks through UPC-A's own structure and checksum math in more depth, this page focuses on EAN-13's international side, particularly its country-prefix system, which UPC-A doesn't have in the same form.

Common Use Cases

EAN-13 is the format behind most retail products sold across Europe, Asia, and the rest of the world outside North America, making it the natural choice for prototyping international packaging, testing labels before a shipment, or reprinting a damaged barcode from a known number. It's also structurally related to the ISBN system used for books internationally, a 13-digit ISBN is directly scannable as an EAN-13 barcode, which is why book barcodes look and behave just like any other retail product code. Small businesses selling into international markets sometimes generate EAN-13 codes for packaging mockups before finalizing a formal GS1 registration for their actual product line.

Common Mistakes

Entering an 11 or 14-digit number and expecting it to work is the most frequent input error, EAN-13 strictly requires a 12-digit base or a full 13-digit code, an error message explains the mismatch if the digit count is off. Assuming the GS1 country prefix tells you where a product was physically made is a widespread misconception worth avoiding, covered in the FAQ below, it only identifies who issued the manufacturer code administratively. As with any barcode format, treating a self-chosen, checksum-valid number as safe to use for an actual product sold at retail is a mistake, real commercial use requires formal GS1 registration to guarantee the number is globally unique rather than colliding with someone else's real product.

Frequently Asked Questions

What is an EAN-13 barcode?

EAN-13 (European Article Number) is the standard 13-digit barcode used on retail products internationally, especially outside North America. The first 12 digits identify the country/manufacturer prefix and product, and the final digit is an automatically calculated checksum.

What's the difference between EAN-13 and UPC?

EAN-13 has 13 digits and is the international standard, while UPC-A has 12 digits and is standard in North America. Every UPC-A code is technically also a valid EAN-13 code with a leading zero, most modern scanners read both formats interchangeably.

What do the first few digits of an EAN-13 code mean?

The first two or three digits are a GS1 prefix indicating which national or regional GS1 member organization issued that particular manufacturer code, not the country the product was actually made in. For example, prefixes starting with 690 through 699 were issued by GS1 China, 890 by GS1 India, and 500 through 509 by GS1 UK. It's an administrative detail about who assigned the number, similar to how a phone number's country code tells you which authority issued it, not necessarily where the phone physically is.

Can an EAN-13 code tell me where a product was actually manufactured?

No, this is a common misconception. The GS1 prefix identifies which country's GS1 office issued the manufacturer their code, a company can be headquartered in one country, manufacture in a second, and have registered its GS1 prefix through a GS1 office in a third if it operates internationally. The barcode's prefix says nothing reliable about the actual country of manufacture, that information (if listed at all) comes from separate packaging text, not the barcode number itself.

Does every country use EAN-13 for retail products?

The vast majority of the world uses EAN-13 (or the closely related UPC-A) for general retail products, since both belong to the same globally coordinated GS1 numbering system. A handful of specialized categories use different standards for specific purposes, ISBNs for books use their own 13-digit format that's technically also scannable as an EAN-13, and pharmaceutical or medical device tracking sometimes layers additional country-specific standards on top, but for everyday retail goods, EAN-13/UPC-A compatibility is close to universal.

Is my EAN number sent anywhere when I generate a barcode?

No. The barcode is rendered entirely in your browser using the open-source JsBarcode library loaded from a CDN, the number you enter is never transmitted to a server, it exists only in your browser tab and inside the downloaded image once you save it.