EAN-13 barcode generator

Make a 13-digit EAN barcode in seconds: type the first 12 digits and the 13th, the check digit, is calculated for you. Below: what the digits mean, how big to print it and how to test it.

Options

Description

Download

Logo in the middle

QR codes only. Your logo stays on your device.

Error correction switches to High so the code still scans. Test-scan one code before printing many.

Link tracking (UTM)
Printing

In the print dialog choose 100% / “Actual size” and turn off headers and footers. Print a test page on plain paper and hold it against a label sheet first.

Your code

What a 13-digit barcode is

The barcode on most products sold in Europe and much of the world is an EAN-13: a pattern of dark bars and light spaces encoding a 13-digit number. That number is the product’s GTIN-13 (Global Trade Item Number). A shop scanner reads the number and looks it up in the shop’s own system to find the price and name, so the barcode itself contains no price and no description.

Strictly speaking, GTIN-13 is the product identifier, while EAN-13 is the barcode symbology that carries it. In everyday use, people often call both an “EAN number” or “13-digit barcode”.

What the 13 digits mean

Take the example number in the generator, 5901234123457. Read from the left:

  • GS1 prefix (590): the initial digits identify the GS1 member organisation associated with that prefix range; 590 is GS1 Poland. GS1 UK uses 500–509, GS1 US uses 001–019, 030–039 and 060–139. The prefix does not show where the product was made.
  • GS1 Company Prefix and item reference: the digits between the GS1 prefix and the final check digit identify the business and its item. Their boundary is not fixed and cannot be reliably determined just by looking at the 13-digit number. A longer licensed company prefix leaves fewer digits for item references. The business assigns a distinct item reference to each separately identified product or variant, following GS1 GTIN allocation rules.
  • Check digit (7): calculated from the other twelve, so a scanner can tell when it has misread a digit.

How the check digit is calculated

GS1 uses the same modulo-10 rule for every GTIN. For EAN-13, multiply the first 12 digits alternately by 1 and 3, starting with 1, add the results and subtract the sum from the next multiple of ten:

  • Digits: 5 9 0 1 2 3 4 1 2 3 4 5
  • × weights: 1 3 1 3 1 3 1 3 1 3 1 3
  • = 5 + 27 + 0 + 3 + 2 + 9 + 4 + 3 + 2 + 9 + 4 + 15 = 83
  • Next multiple of ten: 90. Check digit: 90 − 83 = 7.

If the sum is already a multiple of ten, the check digit is 0. The generator does this for you: type 12 digits and the 13th is added, or type all 13 and it tells you if the last one is wrong. To check a whole list of numbers, use the check digit calculator.

Barcode image or barcode number?

This page makes the image, for free. Whether the barcode is “valid” for retail depends on the number inside it:

  • Selling in shops or on marketplaces: the number must come from GS1, licensed to your company. Amazon and some retailers may verify product identifiers against GS1 records. A number that does not match the relevant records may cause listing problems or rejection.
  • Your own stock, shelves or shop till: you can create internal identifiers without a GS1 licence. Restricted-circulation prefixes (including parts of the 200–299 range) are used for certain local applications, but the applicable rules vary by market; for general internal labelling, a format such as Code 128 may be simpler.

Once you have your GS1 numbers, the generator makes barcodes from them like any others; GS1 does not require you to use its own image tool. The steps, costs and the risks of cheap resold numbers are in how to get a barcode for your product.

Books and magazines: 978, 979 and 977

Some EAN-13 prefixes are not companies but whole numbering systems:

  • 978 and 979 (“Bookland”): a book’s 13-digit ISBN can be encoded in an EAN-13 barcode. You get the ISBN from your country’s ISBN agency, not from GS1, and type all 13 digits here: the last digit of an ISBN-13 is already its EAN check digit.
  • 977: magazines and other serials. The barcode is 977, then the seven digits of the ISSN without its own check digit, then two more digits, then a new EAN check digit. Magazines often add a 2- or 5-digit add-on for the issue number.

EAN-13, UPC-A or EAN-8?

  • UPC-A (12 digits) is used in the USA and Canada. It is the same number system: a UPC-A number corresponds to a 13-digit GTIN with a leading zero, and EAN-13 and UPC-A symbols are accepted globally, subject to trading-partner requirements. If your GS1 numbers are from GS1 US, print them as UPC-A with the UPC barcode generator.
  • EAN-8 is for packages too small for an EAN-13, such as a lipstick or a pack of chewing gum. EAN-8 numbers are not taken from your EAN-13 range; they are allocated separately under GS1 rules. See the EAN-8 barcode generator.
  • ITF-14 goes on outer cartons that hold several retail units; it uses a 14-digit number based on the product’s EAN. See the ITF-14 barcode generator.

What size to print an EAN-13 barcode

At the standard size (100% magnification) an EAN-13 barcode is 37.29 × 25.93 mm, including the digits and the white margins. The narrowest bar is then 0.33 mm wide. For retail packaging, GS1 allows scaling between 80% and 200%:

  • 80%: 29.83 mm wide, the smallest size GS1 recommends for retail;
  • 100%: 37.29 mm wide, the recommended size;
  • 200%: 74.58 mm wide.

Three things go wrong most often on packaging:

  • Cutting the bars short. A designer squeezes the barcode into a narrow strip by lowering the bars (“truncation”). GS1 advises against it because it makes omnidirectional scanning harder. Limited truncation can be allowed in some applications, but preserve the full proportional height whenever possible and check your retailer’s specifications.
  • Losing the white margins (quiet zones). The barcode needs empty space of 11 bar widths on the left and 7 on the right: 3.63 mm and 2.31 mm at 100%. That is why a correct EAN-13 is wider than its bars. Keep text, borders and folds out of these margins.
  • Ink spread. On many printing presses ink spreads and makes every bar slightly thicker. Printers compensate with a “bar width reduction”. Ask your printer for the value.

The generator provides size and print controls: choose PDF or EPS as the format to get a vector file at exact size, with the margins included, set the magnification (80–200%) and enter the bar width reduction your printer gives you. SVG is also exact, but you set its size yourself in your design program; PNG suits labels and screens rather than packaging.

Why EAN-13 barcodes fail to scan, and how to test yours

  • Colours. Shop scanners use red light, so red, orange or yellow bars look like empty space to them. Use black or dark blue bars on a white or light background. Dark backgrounds and metallic or transparent material without a white underprint are risky.
  • Curved surfaces. On tightly curved packaging, such as small cans or bottles, ask your printer whether a ladder orientation (with horizontal bars) would improve scanning.
  • Folds, seams and see-through film. Keep the barcode on a flat, solid area of the pack.
  • The wrong number. A barcode can scan perfectly and still identify the wrong product: for example, because of a typo in the item reference or a number assigned to two variants. Keep a list of which number belongs to which product, and do not reassign a GTIN to another product.

To test: print a sample at the final size on the final material, if possible. A phone barcode scanner app tells you whether it scans and whether the digits are right. It does not tell you whether it meets retail print quality. Large retailers may ask for a verification report: a barcode verifier grades the print to ISO/IEC 15416. GS1 offices and specialist printers offer this service.

Many products at once

Switch to Batch from CSV above and list one product number and name per row: you get every barcode in one ZIP, named after the product, or printed on label sheets.

Frequently asked questions

What is a 13-digit barcode?

It is almost always an EAN-13 barcode (also written EAN13 or GTIN-13), a common retail barcode used worldwide. The bars encode a 13-digit number: a GS1 Company Prefix of variable length, an item reference and a check digit.

How do I make an EAN-13 barcode?

Type the first 12 digits in the generator above. The 13th digit is calculated and added. You can download it as PNG or SVG, or as a true-size PDF or EPS for print. If you type all 13 digits, the generator checks that the last one is correct.

Is this EAN-13 generator free?

Yes. Making the barcode image costs nothing and needs no sign-up, for one barcode or hundreds from a CSV file. What may cost money is the number inside it, if you sell in shops; see the next question.

Where do I get an EAN number for my product?

For products sold in shops or on marketplaces, from GS1, the non-profit that manages product barcodes: the GS1 office in your country licenses a range of numbers to your company. For internal-only identification, you can create your own identifiers, but keep them separate from GS1-licensed GTINs. Our guide on how to get a barcode for your product covers the steps.

Can I generate a random EAN-13 number?

You can make up 12 digits and the generator will add a valid check digit, so the barcode will scan. But a made-up number may already belong to another company’s product. Marketplaces and retailers may verify GTINs against GS1 records and reject identifiers that do not match the product or business. Use made-up numbers only inside your own business.

How is the EAN-13 check digit calculated?

Multiply the first 12 digits alternately by 1 and 3, starting with 1 on the left. Add up the results, then subtract the sum from the next multiple of ten. For 590123412345 the sum is 83, so the check digit is 90 − 83 = 7.

What size should an EAN-13 barcode be?

At the standard 100% size it is 37.29 × 25.93 mm, including the white margins (quiet zones) and the digits. Retail barcodes can be scaled between 80% and 200%; keep the barcode at its full proportional height wherever possible. Shortening the bars reduces scanning reliability. Choose PDF or EPS in the generator to get a file at exact size.

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

UPC-A is the 12-digit version used in the USA and Canada; a UPC-A number can be represented in 13-digit GTIN form with a leading zero; both symbol types are accepted internationally, subject to retailer requirements. EAN-8 is a shorter 8-digit code for very small packages, and its numbers are issued separately by GS1.

Do the first digits show the country of origin?

No. They show which GS1 office issued the number: 500–509 is GS1 UK, for example. A company registered in one country can make its products anywhere, so the prefix says nothing about where a product was made.

Why won’t my EAN-13 barcode scan?

The usual causes are: a barcode printed outside the recommended size range or with excessively shortened bars; white margins cut off by a border or the edge of the label; low contrast, such as red or light bars, or a dark background; ink spread that makes the bars too thick; or a typed check digit that doesn’t match. Test a printed sample with a scanner before ordering packaging.