Esc
↑ ↓ to moveEnter to openEsc to close

Barcodes

What is a 13-digit barcode (EAN-13)?

Updated · 12 min read

Short answer

A 13-digit barcode on a product is almost always an EAN-13, the standard retail barcode. The number it carries is a GTIN-13: a GS1 Company Prefix licensed to the brand owner, an item reference for that product, and a check digit at the end that catches typing mistakes. The first three digits usually show which GS1 office issued the prefix, not the country where the product was made.

A 13-digit barcode on a product is almost always an EAN-13, one of the EAN/UPC barcodes found on nearly every consumer product. The 13 digits under the bars are a GTIN-13 (Global Trade Item Number): a GS1 Company Prefix licensed to the brand owner, an item reference for that one product, and a check digit at the end. The first three digits usually name the GS1 office that issued the prefix, not the country where the product was made. This guide explains each part, shows how to work out the check digit by hand, and covers how to read or make one.

What the first digits tell you

The 13 digits start with What it is
0 A 12-digit UPC-A number, shown with a zero in front
20 to 29 A restricted circulation number: a code for use only within one country or region, for example on fresh food priced by weight or on coupons
977 A magazine or other serial publication (ISSN)
978 or 979 A book: the number is its ISBN (numbers starting 9790 are the exception: they are for sheet music)
952 Kept by GS1 for examples and demonstrations
Most other prefixes A GTIN-13 from a GS1 office, such as 400 to 440 for GS1 Germany or 890 for GS1 India

What is a 13-digit barcode?

The barcode and the number have different names. EAN-13 is the barcode, the pattern of bars a scanner reads. GTIN-13 is the number it carries. GS1, the organization that runs the numbering system behind retail barcodes, says products sold in a store or online should be identified with a 13-digit GTIN, and that this number may be shown as an EAN-13 barcode. GS1 US makes the same distinction: the GTIN identifies the product, and the barcode lets a scanner read it.

EAN stands for European Article Number, the original name for a GTIN-13. GS1 UK says many retailers still call these numbers EANs, and GS1 Japan calls them JAN codes. The European Article Numbering Association, later called EAN International, was set up in 1977 to develop a system for use outside North America that is compatible with the US UPC. In February 2005, GS1 was launched as the successor to both EAN and the US Uniform Code Council (UCC).

The barcode holds only the number. GS1 notes that the description and price are generally not in the barcode: the store’s system looks them up when the number is scanned. The exceptions are store codes for items sold by weight or measure, which can include the price, and coupon codes, which can include the coupon’s value.

The parts of an EAN-13 number

Take 9520012345674. It starts with 952, the prefix GS1 keeps for examples and demonstrations, which makes it safe to use here. Suppose the company prefix licensed to the brand is 9520012:

Digits Part What it means
952 GS1 Prefix The start of the company prefix. It shows which GS1 office issued it (952 is GS1’s example range)
9520012 GS1 Company Prefix Licensed to one company by a GS1 member organization. Prefixes are 4 to 12 digits long; the longer the prefix, the fewer products it can number
34567 Item reference Chosen by the company for this one product
4 Check digit Calculated from the first 12 digits

The company prefix plus the item reference always makes 12 digits, and the check digit is the 13th. So the 7-digit prefix 9520012 leaves 5 digits for item references, 00000 to 99999, which is 100,000 numbers, while a 10-digit prefix leaves 2 digits, enough for 100. GS1’s rules are to number items one after another starting at zero, to keep any meaning out of the item reference, and to keep an accurate record of which number went to which product. Every different product needs its own GTIN, and GS1 US says each variation of a product needs a unique barcode: 3 sizes in 3 colors need 9.

An EAN-13 symbol has bars for only 12 characters, even though it carries 13 digits. The first digit is encoded indirectly: each of the six digits in the left half can be drawn in one of two bar patterns (GS1 calls them number sets A and B), and the order of A and B patterns tells the scanner what the first digit is. For a leading 0, all six use pattern A. Since the first digit has no bars of its own, GS1’s specification has it printed to the left of the start guard bars, in line with the other digits.

Do the first digits show the country of origin?

No. GS1’s own prefix list says “GS1 Prefixes do not identify the country of origin for a given product.” The prefix only shows which GS1 member organization licensed the company prefix. GS1 also says the brand owner normally assigns the GTIN, regardless of where and by whom the product is made. A brand that joined GS1 India gets numbers starting with 890 even for goods made elsewhere, and a product made in India can carry a German prefix.

Some prefixes from GS1’s list:

Prefix Issued by
001 to 019, 030 to 039, 060 to 139 GS1 US
300 to 379 GS1 France
400 to 440 GS1 Germany
450 to 459, 490 to 499 GS1 Japan
500 to 509 GS1 UK
680 to 681, 690 to 699 GS1 China
800 to 839 GS1 Italy
840 to 849 GS1 Spain
890 GS1 India
930 to 939 GS1 Australia

In Italy, the GS1 office was known as Indicod-Ecr before it was renamed GS1 Italy, a change it announced in July 2017. So an “Indicod EAN13” code is an ordinary EAN-13 whose company prefix came from the Italian GS1 office, with a GS1 Prefix from 800 to 839.

How to calculate the EAN-13 check digit

The check digit comes from the first 12 digits, using GS1’s standard method. GS1 uses the same method for GTIN-8, GTIN-12 (UPC-A), GTIN-14 and its other numbers, such as the SSCC on shipping labels. GS1 writes the rule from the right: the digit next to the check digit is multiplied by 3, the one before it by 1, and so on. For a 13-digit number, that works out as:

  1. Starting from the left, multiply the 1st, 3rd, 5th, 7th, 9th and 11th digits by 1.
  2. Multiply the 2nd, 4th, 6th, 8th, 10th and 12th digits by 3.
  3. Add all 12 results together.
  4. Subtract the total from the next multiple of 10, or from the total itself if it already is one. The answer, 0 to 9, is the check digit.

Here is the worked example for 952001234567:

Position Digit Multiply by Result
1 9 1 9
2 5 3 15
3 2 1 2
4 0 3 0
5 0 1 0
6 1 3 3
7 2 1 2
8 3 3 9
9 4 1 4
10 5 3 15
11 6 1 6
12 7 3 21
Total 86

The next multiple of 10 is 90, and 90 minus 86 is 4. That makes 4 the check digit and 9520012345674 the full barcode number. To practice, try GS1’s own example, 629104150021: the results add up to 57, so its check digit is 3.

How to check a full 13-digit number

Multiply all 13 digits by 1 and 3 in turn, starting with 1, and add them up. If the total is a multiple of 10, the check digit is right: for 9520012345674 that is 86 + 4 = 90. A single mistyped digit always breaks this: a digit that is off by 1 to 9 moves the total by 1 to 9, or by 3 to 27 in steps of 3, and none of those is a multiple of 10. Swapping two neighboring digits breaks it too, unless the two digits differ by exactly 5, such as 1 and 6. GS1’s specification has barcode readers run this check automatically on EAN and UPC barcodes, so a misread that breaks the sum is rejected.

Passing the test proves only that the 13 digits fit together. A made-up number can pass it too, so it tells you nothing about whether GS1 issued the number. Our EAN-13 barcode generator does the sum for you: type 12 digits and it adds the 13th, or type all 13 and it tells you whether the last one is right.

13 digits starting with 0: a UPC-A barcode

A UPC-A barcode carries a 12-digit number, a GTIN-12. The GS1 General Specifications let a scanner read a UPC-A as a 13-digit number by adding a zero in front, and they keep a leading 0 in EAN-13 for exactly those numbers. The pattern of bars and spaces is the same either way, so a scanner can report one printed UPC-A as 12 or 13 digits. GS1’s own example is the 12-digit GTIN 614141234561: it has an implied leading zero, so its GS1 Prefix is 061, not 614, and as 13 digits it reads 0614141234561. The check digit stays 1, because a leading zero adds nothing to the sum.

GS1 US makes the same point from the other side: a GS1 Company Prefix is the U.P.C. Company Prefix with a zero added to the beginning. To make a barcode in the 12-digit form, use the UPC barcode generator.

Can you sell in the US with an EAN-13?

Yes. GS1 UK says EAN-13 barcodes are accepted worldwide, including in the US, and that US businesses have been updating their systems to support GTIN-13 since 2005. A small number may still not process every GTIN format, so if a US business asks for a UPC, check whether its system can take your 13-digit number before you relabel anything. The reverse holds too: GS1 US says the numbers in its barcodes are accepted nearly everywhere products are sold.

13-digit barcodes on books: ISBN

Since January 1, 2007, every ISBN has 13 digits, and its first three digits are 978 or 979. GS1 has given those two prefixes, which it calls Bookland, to the International ISBN Agency, apart from the part of 979 that starts 9790, which goes to the ISMN agency for sheet music and other notated music. So a book’s ISBN-13 is also its 13-digit product number and is printed as an EAN-13 barcode. The ISBN check digit uses the same method, weights of 1 and 3 with modulus 10. Magazines and other serials use the prefix 977, for the ISSN.

The small second barcode to the right of the main one on many books and magazines is an add-on. GS1 lets an EAN-13, UPC-A or UPC-E barcode have a separate 2- or 5-digit add-on beside it, with more information about that particular book or issue. The publisher decides what the digits mean, the add-on is only ever read together with the main barcode, and store checkouts do not have to read it. For magazines and other serials, GS1 recommends numbering a 2-digit add-on by issue: the week (01 to 53) for weeklies or the month (01 to 12) for monthlies. On US books, the 5-digit add-on can carry the cover price under the Book Industry Study Group (BISG) guidelines: a leading 5 means US dollars, so 51995 is $19.95, and 90000 means no US dollar price is encoded.

ISBNs do not come from GS1: the publisher applies to its national ISBN agency. Our EAN-13 generator makes ISBN barcodes from the 13 digits, but it does not make 2- or 5-digit add-on codes, and our barcode scanner reads the main 13 digits and ignores the add-on.

How to get a real EAN-13 number

A barcode number for products sold in stores or on marketplaces has to come from GS1, which works through local member organizations in over 120 countries.

  1. Find your country’s GS1 office from GS1’s “get barcodes” page.
  2. Join and license a GS1 Company Prefix. If you only need a few numbers in the US, GS1 US also licenses single GTINs.
  3. Give each product an item reference, in order from zero, and record which number belongs to which product.
  4. Add the check digit to make the 13 digits.
  5. Turn the number into a barcode image and place it on your packaging.

Avoid buying numbers from barcode resellers. GS1 US warns that GTINs not issued directly by GS1 may be linked to another company and do not comply with GS1 standards. GS1 Canada says numbers bought elsewhere could be duplicated or fraudulent and may not be linked to your business, and that retailers and distributors use GS1’s registry to check who owns a number. GS1 India says it does not appoint agents or intermediaries, and that only the brand owner, or someone the brand owner authorizes, can apply.

For labels that never leave your business, such as stock locations or asset tags, you do not need GS1 numbers. A Code 128 barcode with your own codes is simpler.

How to read a 13-digit barcode from a photo

  1. Take a sharp photo or a screenshot of the barcode, with the white margins on both sides in the picture.
  2. Open our barcode and QR code scanner and drop or paste the image. It reads EAN-13, UPC and other barcodes right in your browser.
  3. Read the digits on the result card, which also says whether the check digit is correct.
  4. To see which company a number is licensed to, search it on Verified by GS1, GS1’s lookup for barcode numbers.

How to make an EAN-13 barcode

  1. Get your number from GS1, as described above: your company prefix plus an item reference, 12 digits in all.
  2. Open the EAN-13 barcode generator and type the 12 digits. It adds the check digit, or verifies it if you type all 13.
  3. Keep the standard size if you can. For barcodes scanned at a store checkout, GS1’s target X-dimension (the width of the narrowest bar) is 0.330 mm, and its size table allows 0.264 to 0.660 mm, which is 80% to 200%.
  4. Download the SVG or PDF and drop it into your packaging artwork without scaling it. Leave the blank quiet zones clear: GS1 asks for 11 times the X-dimension on the left and 7 times on the right.
  5. Print dark bars on a light background, ideally black on white, and test the printed barcode with a scanner.

EAN-13 compared with other product barcodes

Barcode Digits Where it is used
EAN-13 13 Retail products around the world
UPC-A 12, or 13 with a leading zero Retail products with a 12-digit GTIN-12
EAN-8 8 Very small items only
ITF-14 14 Trade items that do not go through a store checkout

The general barcode generator makes all four, with check digits calculated for you and sizes and quiet zones taken from the GS1 standards.

Retail is also moving toward 2D barcodes. GS1 US calls Sunrise 2027, the push for store checkout systems to read 2D barcodes, a milestone in that move: QR codes and other 2D codes on packs can carry the same GTIN as the product’s EAN or UPC, so the number does not change, and brands can add them to existing packaging.

Make an EAN-13 barcode

Type the 12 digits of your GTIN and the free uncrop.si generator adds the check digit and draws the barcode at GS1 sizes, as PNG, SVG or PDF. Nothing is uploaded.

Make an EAN-13 barcode

Questions

Is EAN-13 the same as GTIN-13?

They go together, and people often use the names for the same thing. GTIN-13 is the 13-digit number that identifies the product. EAN-13 is the barcode, the pattern of bars a scanner reads to get that number.

Does a barcode starting with 890 mean the product was made in India?

No. 890 means the brand owner licensed its company prefix from GS1 India. GS1 says its prefixes do not identify the country of origin, because companies can make their products anywhere.

Can I make up my own 13-digit barcode number?

Not for products sold in stores or on marketplaces. An invented number can clash with a product another company already sells under it, and retailers and marketplaces look numbers up in GS1's registry to see who owns them. For labels used only inside your business, use a Code 128 barcode with your own codes instead.

Does a 13-digit barcode contain the price?

Generally no. The barcode holds only the product number, and the store's system looks up the description and price when it is scanned. GS1's exceptions are store codes for items sold by weight or measure, which can include the price, and coupon codes, which can include the coupon's value.

How do I find out who owns a 13-digit barcode?

Read the digits, for example with our barcode scanner for photos, then search the number on Verified by GS1, the GS1 lookup for barcode numbers. For a number GS1 issued, it almost always shows the company the number is licensed to.

What is an Indicod EAN13 code?

Indicod-Ecr was the former name of GS1 Italy, which issues EAN-13 numbers to Italian companies; the change to GS1 Italy was announced in 2017. An Indicod EAN13 code is an ordinary EAN-13, and Italian company prefixes start with 800 to 839.

How much does an EAN-13 barcode cost?

The barcode image is free with our EAN-13 barcode generator. The number is licensed by your country's GS1 office, and fees differ by country. As of October 2026, GS1 US charges a one-time $30 for a single GTIN with no renewal fee, or $250 to $10,500 for a company prefix covering 10 to 100,000 products, plus $50 to $2,100 a year to renew. GS1 UK charges an annual license fee based on turnover, from £50 for turnover up to £99,999 (10 GTINs) to £4,250 for turnover over £1 billion (100,000 GTINs), excluding VAT. GS1 India's fees, in force from October 1, 2026, depend on your turnover, the number of barcodes (100, 1,000, 10,000 or 100,000) and the subscription period, and you also pay a refundable security deposit and taxes. Choose the number of barcodes with care, because GS1 India says it cannot be changed later.

Sources

Steps were checked against official help pages on 26 October 2026. Menus change, so tell us if something moved.

  1. How to calculate a check digit manually (GS1)
  2. GS1 Company Prefix and GS1 Prefix list (GS1)
  3. How to create a GTIN (GS1)
  4. GS1 General Specifications, Release 26.0 (GS1)
  5. Ready to sell? Start with a GS1 barcode/GTIN (GS1)
  6. EAN/UPC barcodes (GS1)
  7. Verified by GS1: look up a barcode number (GS1)
  8. Barcode FAQs: GS1 Company Prefix, barcodes and identification (GS1 US)
  9. Globally accepted Amazon UPCs and product barcodes (GS1 US)
  10. Frequently asked questions (GS1 Canada)
  11. What is an ISBN? (International ISBN Agency)
  12. Alberto Frausin, nuovo Presidente di GS1 Italy (GS1 Italy press release, July 2017, in Italian)
  13. What is an EAN? (GS1 UK)
  14. GS1 Company Prefix and GTIN (JAN code) (GS1 Japan, in Japanese)
  15. Which barcode should I use for point of sale? (GS1 UK)
  16. Do I need a UPC for America? (GS1 UK)
  17. How to get UPC barcodes for products (GS1 US)
  18. How much does GS1 UK membership cost? (GS1 UK)
  19. Barcode registration: apply for a barcode in India (GS1 India)
  20. Barcoding guidelines for the US book industry (BISG)
  21. What is GS1 Sunrise 2027? (GS1 US)
  22. ZXing-C++, the open-source barcode library our scanner uses

Free tools for this

Related guides