EAN-13 barcode generator

Type the first 12 digits and get an EAN-13 barcode with the check digit added. Download it as PNG or SVG for labels and packaging. Nothing is uploaded.

  • Free
  • No sign-up
  • Runs in your browser
barcode-ean13

100% private — the barcode is drawn in your browser and nothing is sent to any server.

Next step

Keep going with your result in another tool. Nothing is uploaded.

How it works

Type the value

The barcode is drawn as you type.

Adjust the size

Set the bar width and height, and show or hide the text.

Download it

Save it as PNG or SVG and test it with a scanner.

How to generate an EAN-13 barcode

To generate an EAN-13 barcode, enter the first 12 digits of the number in the value box above, and the barcode appears with the thirteenth digit, the check digit, added automatically. If you type all 13 digits, the tool checks the last one and warns you if it is wrong. Download the barcode as PNG or SVG. It runs in your browser and nothing is uploaded.

What is EAN-13?

EAN-13 (European Article Number) is the barcode on most products sold worldwide. It encodes 13 digits: a GS1 prefix that usually points to the country of the company that registered the number, the company and product number, and a final check digit. In North America the same 13 digits are also written as a GTIN-13, and UPC-A codes are simply EAN-13 with a leading zero.

Reading the number

Structure of an EAN-13
DigitsMeaning
First 2-3GS1 prefix, for example 84 for Spain, 978 for books (ISBN)
Next 4-7Company prefix, issued by GS1
Following digitsProduct number chosen by the company
Last digitCheck digit

How the check digit is calculated

Take the first 12 digits, 590123412345. Multiply them alternately by 3 and 1, starting with 3 for the rightmost one: 5×1 + 9×3 + 0×1 + 1×3 + 2×1 + 3×3 + 4×1 + 1×3 + 2×1 + 3×3 + 4×1 + 5×3 = 83. The check digit is what you add to reach the next multiple of 10: 90 − 83 = 7. The full number is 5901234123457. The generator adds it for you when you type only the first 12 digits, and warns you if a full number has a wrong check digit.

Where it is used

  • Retail products sold in shops and online marketplaces.
  • Books, as the ISBN-13 is printed as an EAN-13 that starts with 978 or 979.
  • Inventory labels and shelf tags in your own warehouse.
  • Test labels while developing a point-of-sale system.

Generating a barcode is not the same as owning the number

This tool draws a correctly formatted barcode from any number you give it. That is enough for internal use, such as inventory, shelves or test labels. To sell a product in shops and on marketplaces, however, the number must be a GTIN issued by GS1 through a licensed company prefix; otherwise it may collide with another company's product. Buy your numbers from GS1 in your country, then use this tool to draw the codes.

Private by design

The code is drawn by your browser on your own device. What you type, including passwords and contact details, is never sent to a server, and the finished image is yours with no watermark and no expiry.

Frequently asked questions

What is the difference between EAN-13 and UPC-A?
UPC-A has 12 digits and is used in the United States and Canada. Every UPC-A can be written as an EAN-13 by adding a leading zero, and scanners read both.
Does the prefix show where a product was made?
No. The GS1 prefix shows the country where the company registered its number, not where the product was made.
What size should I print it?
The standard size is about 37 mm wide, and it can be scaled from 80% to 200%. Keep a white margin at the sides, print dark on light and test with a scanner.
Is this converter free?
Yes. There is no sign-up and no limit, and it runs in your browser, so nothing you type is sent to a server.
Does it work on a phone?
Yes. It works in any modern mobile browser, and the result updates as you type.