Text and data

EAN-13 barcode generator

Thirteen digits, check digit calculated, print-ready.

On this device

Enter the EAN number

Twelve digits get the thirteenth added; thirteen are checked. Anything but digits is refused.

Code 128 needs no registration. EAN-13 and UPC-A need a number issued to you.

Any ASCII text. Nothing is uploaded.

SizeCode 128 · medium
Size

The narrowest bar, in pixels. The SVG is sharp at any size.

Taller bars are easier for a scanner to catch.

What this tool does, exactly

EAN-13 is the thirteen-digit retail code used on products everywhere outside North America, and every retail scanner inside it reads one too. Give it the first twelve digits of your number and the thirteenth is calculated; give it all thirteen and it is verified.

What the thirteen digits are
The first two or three digits are the GS1 prefix of the organisation that issued the number: 400 to 440 for Germany, 50 for the United Kingdom, 690 to 699 for China. It says where the company registered, not where the product was made. Then come the company and product numbers, split differently by prefix, and the check digit computed from the twelve before it. An EAN-13 beginning with 0 is a UPC-A.
Where an EAN comes from
Your national GS1 member organisation issues the company prefix, and the large marketplaces check numbers against its registry. For internal labels, Code 128 needs no number from anyone.
How the check digit is built
Weights of one and three alternate across the first twelve digits, starting with one, and the check digit brings the weighted sum up to a multiple of ten. Enter twelve digits and it is computed; enter thirteen and the tool names the correct final digit if yours is wrong.
How the bars are laid out
The symbol is 95 modules wide. A start guard of 101, a centre guard of 01010 and an end guard of 101 are what a scanner uses to find the symbol and to tell which way round it is reading. Between them sit the six digits of each half, drawn from different bar tables.
Typing the number
Spaces and hyphens are ignored, so a number copied from a spreadsheet or a label can be pasted as it is. Anything that is not a digit is refused, and the tool names the rule instead of dropping characters.
Sizing an EAN-13
At the nominal 0.330 mm module the symbol is 37.29 mm wide including its quiet zones, with bars 22.85 mm tall. GS1 allows 80% to 200% of that module. Retail scanners misread below 80%. The quiet zone is eleven modules on the left and seven on the right, and both must stay blank. Scale the width and height together, and use the SVG so edges stay hard at any size.

The short answer

A 13-digit barcode on a product is an EAN-13. Its bars carry a GTIN-13: the company prefix a GS1 organisation licensed to the brand, the brand's own item number, and a check digit worked out from the first twelve. Books use the same symbol with 978 or 979 in front, which is an ISBN. Type twelve digits here and the thirteenth is calculated; type all thirteen and it is checked.

The check digit, worked through

Take the first twelve digits, 952012345678. Prefix 952 is reserved by GS1 for examples, so no product carries it. Reading from the right, the digit beside the check digit is weighted 3, the next 1, and so on alternately. Add the weighted products; the check digit lifts that total to the next multiple of ten.

Check digit for 952012345678
PositionDigitWeightProduct
19×19
25×315
32×12
40×30
51×11
62×36
73×13
84×312
95×15
106×318
117×17
128×324
Sum102

102 rounds up to 110; 110 − 102 = 8, so the complete EAN-13 is 9520123456788. GS1 General Specifications, Release 26.0 (January 2026), section 7.9.1, uses this one rule for every fixed-length GS1 number.

About this tool

What do the leading digits of an EAN-13 tell a scanner?

Which GS1 member organisation issued the company prefix, such as 50 for the United Kingdom. It names the registering country of the company, not the origin of the goods. The remaining digits split between company and product, and the last one checks the rest.

When do I need EAN-13 rather than UPC-A?

They are the same code in two lengths. If you sell in North America, retailers expect UPC-A; anywhere else, EAN-13. An EAN-13 that starts with 0 is a UPC-A, and every retail scanner reads both.

What is EAN-8?

A short eight-digit form for very small packaging, issued separately by GS1. This tool draws EAN-13 and UPC-A only; an EAN-8 is not a shortened EAN-13 and cannot be derived from one.

What if my check digit is wrong?

The tool refuses to draw the symbol and names the digit the thirteenth position should have been. A barcode whose last digit disagrees with the others would be rejected by every scanner that read it.

How do I get an EAN for something I sell?

Ask your national GS1 member organisation, which issues the company prefix. An invented number collides with a real product or is refused when a marketplace checks the registry. This page draws any valid thirteen digits, so use numbers issued to you.

More text and data tools · All 55 · How they work