Barcodes EAN-13 Runs in your browser

EAN-13 Barcode Generator

Create and validate 13-digit EAN-13 product barcodes.

Your data is processed locally in your browser and is not uploaded to our servers.

What is an EAN-13 barcode?

EAN-13 is the 13-digit barcode used on retail products worldwide. It begins with a GS1 country/prefix, followed by the manufacturer and product codes and a check digit.

How to create one

Enter 12 digits to have the check digit calculated, or a full 13-digit number to validate it. Only digits are accepted, and the check-digit calculation is shown in full.

How the check digit works

Like UPC, EAN-13 uses a modulo-10 checksum, but the weighting pattern alternates 1 and 3 from the right. The result panel lists the entered digits, the computed check digit and the complete barcode number.

Generating vs registering

This creates a valid barcode image, not an official product identity. Registered EAN/GTIN numbers come from GS1 and are required for retail distribution.

Scanning and printing tips

Keep high contrast, preserve the quiet zones, and print at a size retailers accept. Adjust bar width and height here, and export SVG for print resolution.

Limitations

A generated image doesn't grant you a registered GTIN. Very small prints and low contrast reduce scannability.

The check digit, calculated by hand

EAN-13 uses the same modulo-10 checksum as UPC-A, applied to 12 digits instead of 11. Take 590123412345:

  1. From the right, multiply alternately by 3 and 1:
    5×3=15, 4×1=4, 3×3=9, 2×1=2, 1×3=3, 4×1=4, 3×3=9, 2×1=2, 1×3=3, 0×1=0, 9×3=27, 5×1=5
  2. Sum: 15+4+9+2+3+4+9+2+3+0+27+5 = 83
  3. Next multiple of ten minus the sum: 90 − 83 = 7

The complete number is 5901234123457. Note the weights land differently than in UPC-A because the payload has one more digit — this is why you always weight from the right-hand end, never from the left.

Paste any 13-digit number into the field above and the check digit is verified as you type; paste 12 and it is calculated for you. The barcode validator shows the same working for any symbology.

What the first digits do and do not tell you

The leading digits are a GS1 prefix, and they are widely misread. A prefix of 50 was allocated to GS1 UK; it identifies the numbering organisation that issued the company prefix, not the country of manufacture. A British company can have goods made anywhere in the world and still carry a 50 prefix, entirely legitimately.

Two prefixes worth recognising because they are not products at all:

  • 978 and 979 — books. The number is a Bookland EAN carrying an ISBN. Use the ISBN generator, which converts and validates properly.
  • 977 — serials. The number carries an ISSN; use the ISSN generator.
  • 020–029 — restricted circulation. Reserved for use inside a single company or store, never on goods that leave it.

Printing an EAN-13 that a checkout will read

Retail point-of-sale is unforgiving in a way that internal scanning is not: the symbol has one chance, at speed, at an angle, through a scratched window.

GS1 defines a nominal (100%) EAN-13 as 37.29 × 25.93 mm with an X-dimension — the width of the narrowest bar — of 0.330 mm. Retail scanning permits magnification from 80% to 200%, so an X-dimension between 0.264 mm and 0.660 mm. Below 80% the symbol is out of specification and a retailer can reject it.

  • Do not scale non-uniformly. Squashing the height to fit a label breaks the omnidirectional scanning the height provides.
  • Do not truncate the height for the same reason. If the label is too short, reduce magnification within the permitted range instead.
  • Leave the quiet zones. Ten X-dimensions of clear space each side — at nominal size that is 3.3 mm, and it is the most commonly violated requirement in retail packaging.
  • Keep the human-readable digits. They are the fallback when the symbol will not scan.
  • Print dark bars on a light background. Red bars are invisible to a red-laser scanner. White bars on dark, or any coloured background with low contrast, will fail.

The barcode size calculator converts between magnification, X-dimension, physical size and printer resolution, and warns when an X-dimension falls below what your printer can actually resolve.

Frequently asked questions

What is the difference between EAN-13 and UPC-A?

UPC-A is a 12-digit North American subset; EAN-13 adds a leading digit for a 13-digit global format. Many scanners read both.

Can I enter just 12 digits?

Yes. The tool computes the 13th check digit automatically.

Is this an official product number?

No. It produces a scannable image. Official EAN/GTIN numbers are issued by GS1.

Curious how we build and check these codes? Read our methodology, and the disclaimer on what a generated barcode image is and is not.