EAN Barcode Generator

Type a 12-digit number for EAN-13, or a 7-digit one for EAN-8, and the check digit is added. Type the full number and the check digit is verified instead.

How it works

EAN-13 is the barcode on most products sold outside the United States and Canada. EAN-8 is the short form for packs too small for the full code. Both are run by GS1, which issues the numbers.

The last digit is a check digit. Starting from the right of the other digits, every second digit is multiplied by 3 and the rest by 1. The check digit is whatever brings the total up to the next multiple of 10. For 400638133393 the total is 89, so the check digit is 1.

In an EAN-13 the first digit is not drawn as bars. It decides which of two patterns each of the next six digits uses, and the scanner works it out from those patterns. That is why it is printed outside the bars, on the left.

The drawing includes the long guard bars at the start, middle and end, the digits in their two groups, and the white margins GS1 asks for: 11 modules on the left and 7 on the right of an EAN-13.

How to use it

  1. 1 Choose EAN-13 or EAN-8.
  2. 2 Type the number without its last digit to have the check digit added, or with it to have it checked.
  3. 3 Read the full number the page shows, and fix any typo it reports.
  4. 4 Download the barcode as SVG for packaging artwork, or as PNG for documents.

Good to know

  • Spaces and hyphens are ignored, so you can paste a number in whatever form your supplier sent it.
  • Print at 100% where you can: an EAN-13 module is nominally 0.33 mm, which makes the whole code about 37 mm wide with its margins.
  • Do not shorten the bars to save space. Cutting the height makes a code harder to scan from an angle.
  • Keep the white margins clear of artwork, especially on the left, where the first digit sits.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

Checking a supplier's EAN-13 before the packaging goes to print

Picture a small food brand preparing the label for a new jar of honey. The brand has a GS1 company prefix, and the operations sheet says the new product is 4006381333932. The designer needs the barcode for the label artwork, and the printer will print 20,000 labels from it. A wrong digit at this point means a jar that no till can sell.

The designer types the number in. The page refuses it: the check digit is 2, but for 400638133393 it should be 1. Here is the sum. Reading the first 12 digits from the right, 3, 9, 3, 3, 3, 1, 8, 3, 6, 0, 0, 4, the weights alternate 3 and 1. That gives 9 + 9 + 9 + 3 + 9 + 1 + 24 + 3 + 18 + 0 + 0 + 4 = 89, and the next multiple of 10 is 90, so the check digit is 1. Somebody mistyped the last digit on the sheet.

A quick call confirms the real number is 4006381333931. Typed in, the page says the check digit 1 is correct and draws the code. The first digit, 4, is printed outside the bars. Because it is a 4, the six digits after it use the patterns L, G, L, L, G and G, and the last six use the right-hand pattern. The long guard bars sit at the start, the middle and the end, and the white margins are part of the file.

The designer downloads the SVG and places it at 100%, where each module is 0.33 mm and the whole code, margins included, is about 37 mm wide. The space on the jar is 30 mm. GS1 allows an EAN-13 to be scaled down to 80%, which gives about 30 mm, so the code fits without cutting the margins or the bar height. A test label is printed and scanned with a phone barcode app before the full run.

This tool has limits. It draws EAN-13 and EAN-8 only, without the 2 or 5 digit add-on codes used on magazines and books. It checks the arithmetic of a number, not whether the number is yours: only GS1 can say which company a prefix belongs to. It does not print the ">" quiet zone marker some packaging uses. And print quality is out of its hands. A barcode printed too small, too faint or with bars that bleed can fail at the till however correct the number is.

Frequently asked questions

Can I make up an EAN number for my product?

Not one that shops will accept. Retailers expect a number from a company prefix you license from GS1 in your country. A made-up number can belong to another company's product. This page draws the barcode for a number you already have.

Does the first digit show the country the product is made in?

No. The first two or three digits show which national GS1 office issued the company prefix. A company registered in Germany can make its products anywhere.

When should I use EAN-8 instead of EAN-13?

Only when the pack is too small for an EAN-13 and you have an EAN-8 number from GS1. EAN-8 numbers are issued separately and are in short supply, so most products use EAN-13 even on small packs.

Is my number uploaded?

No. The check digit and the barcode are worked out by JavaScript in this tab, and nothing you type is sent.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.