Skip to content

EAN-13 barcode generator

The retail barcode used on packaged goods outside North America. Type your 12-digit article number and the thirteenth digit is computed automatically.

Generate a EAN-13 barcode

#000000
#ffffff

SVG shape mask (decorative)

Upload an SVG — the barcode is clipped to its shape. A horse SVG makes a horse-shaped barcode.

Live preview

EAN-13 encodes a 13-digit GTIN-13: a GS1 company prefix, an article reference you assign yourself, and a final check digit. It is the code a supermarket till reads, and it is scanned more times per day than any other barcode in existence.

The one thing a generator cannot do for you is give you a number. The leading digits of an EAN-13 identify a GS1 member organisation and, through it, a specific company. You obtain a company prefix from GS1 — GS1 Germany for a German company — and then allocate article references from within it. A number you invent will either be rejected by the retailer or collide with a real product somewhere in the world, which is worse.

The first two or three digits are often described as a country code. They are not: they identify the GS1 member organisation that issued the prefix, which usually but not always corresponds to where the company is registered. A product bearing a 40–44 prefix was registered through GS1 Germany; it says nothing about where the goods were manufactured.

What EAN-13 encodes

Character set Digits 0–9 only
Length 12 digits (check digit computed) or a complete 13
Check digit Modulo 10, weights 1 and 3 alternating from the right
Dimensions Linear (1D)
Nominal size 37.29 × 25.93 mm at 100 % magnification, scalable from 80 % to 200 %
Standard ISO/IEC 15420, GS1 General Specifications

Where EAN-13 is actually used

Retail point of sale

Groceries, books, cosmetics, hardware — anything sold through a shop outside the US and Canada.

Online marketplaces

Amazon, eBay and most European marketplaces require a GTIN, which for most sellers means an EAN-13.

Books and periodicals

ISBN-13 is an EAN-13 with a 978 or 979 prefix; ISSN uses 977, usually with a two- or five-digit add-on.

Warehouse receiving

Distribution centres scan the same EAN-13 on the item as the shop till does.

Rules this EAN-13 generator enforces

  • Digits only. Any letter, space or hyphen makes the value invalid.
  • Give 12 digits and this generator appends the correct check digit. Give 13 and it validates the one you supplied.
  • A 13-digit value whose last digit is wrong will be rejected rather than silently corrected — that is deliberate, because a wrong check digit is almost always a typo earlier in the number.
  • EAN-13 has no capacity for text. If you need a batch number or an expiry date on the same label, add a separate GS1-128 symbol.

Printing a EAN-13 symbol that scans

EAN-13 is the one symbology where size is genuinely standardised. The nominal symbol is 37.29 mm wide and 25.93 mm tall including the light margin indicators, and it may be scaled between 80 % and 200 % of that. Below 80 % supermarket scanners start to fail, and retailers do reject packaging over it.

Do not truncate the bar height to make the symbol fit a narrow strip. Shortened bars force the scanner beam to cross the symbol almost horizontally, which is exactly the condition an omnidirectional till scanner is bad at. Keep the guard bars that drop below the digit row, and leave the > character at the right-hand edge in place: it marks the quiet zone.

EAN-13 questions

Can I make up an EAN-13 number for my product?

Not if it will be sold in a shop. EAN-13 numbers are allocated from a GS1 company prefix. An invented number is not yours, and it may already belong to someone else’s product.

How is the EAN-13 check digit calculated?

Take the first 12 digits, multiply them alternately by 3 and 1 starting from the right, add the results, and subtract the total from the next multiple of ten. This generator does it for you as you type.

Is ISBN the same as EAN-13?

A modern ISBN-13 is printed as an EAN-13 with the prefix 978 or 979. The bars, the check digit rule and the scanner behaviour are identical.

Other barcode formats