A GTIN (Global Trade Item Number) is the GS1 number that identifies a trade item, meaning anything that gets priced, ordered or invoiced somewhere in the supply chain. GTINs come in four lengths: 8, 12, 13 and 14 digits. "UPC" and "EAN" are really the names of the barcodes, and the everyday names, for GTIN-12 and GTIN-13. All four lengths belong to one family. Pad any of them on the left with zeros to 14 digits and you get the form GS1 wants databases to store.

This guide covers each format, how the formats nest, what the extra digit on a case code means, and the GS1 rules for when a product change requires a new number.

The four GTIN formats

Format Digits Printed as Used for Example
GTIN-12 12 UPC-A (or compressed UPC-E) Retail units, mainly US and Canada 036000291452
GTIN-13 13 EAN-13 Retail units everywhere else; ISBN-13 for books 4006381333931, 9780306406157
GTIN-8 8 EAN-8 Packs too small for an EAN-13 96385074
GTIN-14 14 ITF-14, GS1-128 Cases, cartons and pallets; variable-measure goods 10614141000996

GS1 US's introduction to the GTIN makes the pairing strict: GTIN-12 is the only GTIN that goes in a UPC-A, GTIN-13 the only one in an EAN-13, and GTIN-8 the only one in an EAN-8. A GTIN-14 can't be printed as UPC or EAN at all. Going the other way is more flexible: any GTIN can go in an ITF-14 or GS1-128 symbol as long as it's written as 14 digits.

What the digits mean

Take GS1 US's sample GTIN-12 614141453245:

  • 614141: company prefix. A GS1 member organization licenses this to the brand owner. Prefixes vary in length. The longer the prefix, the fewer item numbers it leaves room for. (For GTIN-12, GS1 calls it a U.P.C. Company Prefix.)
  • 45324: item reference. The brand owner assigns it. The digits carry no meaning: 45324 doesn't encode size or color.
  • 5: check digit. It's calculated from the other 11 digits with GS1's mod-10 formula, so a scanner or database can catch a mistyped number.

The first few digits of the prefix show which GS1 office issued it. They don't show where the product was made, a distinction covered in our guide to barcode prefixes and country codes. GTIN-14 adds one more component at the front, the indicator digit, which gets its own section below.

How GTINs nest: everything pads to 14

The four formats aren't separate numbering systems. They're the same number space written at different widths:

Native form As GTIN-14
GTIN-8 96385074 00000096385074
GTIN-12 036000291452 00036000291452
GTIN-13 4006381333931 04006381333931
GTIN-13 (ISBN) 9780306406157 09780306406157
GTIN-14 10614141000996 10614141000996

GS1 US spells out the storage rule: a "14-digit fixed-length text field, right-justified & zero-filled". To count as "GTIN compliant", a system has to be able to process and store all four formats in that 14-digit form.

Padding is safe because the check digit is calculated from the right. Weights of 3 and 1 alternate outward from the last digit, and a leading zero contributes 0 to the sum, so 036000291452, 0036000291452 and 00036000291452 all have the same check digit and identify the same product. It's also why a UPC-A can be treated as an EAN-13 that starts with 0.

In practice:

  • Key your product table on the 14-digit text form and keep the original string for display. A UPC-A stored as 036000291452 and an EAN-13 stored as 0036000291452 will then match each other.
  • Never store GTINs as integers. The leading zeros disappear, and with them the information about which width the code was printed at.
  • A 13-digit code starting with 0 is a UPC-A. Drop the zero for systems that expect 12 digits.
gtin.py
import re

def to_gtin14(code: str) -> str:
    digits = re.sub(r"[^0-9]", "", code)          # drop spaces, dashes, anything else
    if len(digits) not in (8, 12, 13, 14):
        raise ValueError(f"not a GTIN length: {code!r}")
    return digits.zfill(14)

to_gtin14("0-36000-29145-2")  # '00036000291452'
to_gtin14("96385074")         # '00000096385074'

The indicator digit and GTIN-14

The indicator digit is the first digit of a GTIN-14, and GTIN-14 is the only format that has one. Values 1 to 8 identify packaging levels above the retail unit: inner packs, cases, pallets. 9 is reserved for variable-measure items such as meat, cheese, seafood and textiles, which are sold by weight or length rather than in fixed units.

A case GTIN-14 normally reuses the unit's company prefix and item reference with a new indicator and a recalculated check digit. Here's the arithmetic, starting from the UPC-A 036000291452:

1
Write the unit GTIN as 13 digits

036000291452 becomes 0036000291452.

2
Drop the check digit

That leaves 003600029145.

3
Put the indicator in front

With indicator 1, you get 1003600029145.

4
Recalculate the check digit

Weight the 13 digits 3, 1, 3, 1... starting from the right and the sum is 61. The next multiple of 10 is 70, so the check digit is 9. Result: 10036000291459.

That shows how the number is built. It isn't a real case code. Only the brand owner can decide that a case configuration exists and assign it a GTIN, so never derive a case number this way and assume it's in use.

Here's a real hierarchy from GS1 US's guide. A 12-pack sold at retail as UPC-A 614141000999 ships in a 2×12 case 10614141000996, a 4×12 case 30614141000990 and an 8×12 case 50614141000994. The indicators don't have to be consecutive: each one just has to give each packaging level its own number. A few more rules from the same guide:

  • The unit and the case can never share a GTIN.
  • Don't use an indicator digit without a hierarchy. A GTIN-14 with no matching inner item suggests a case of some other product, and GS1 doesn't permit it.
  • A mixed case gets its own GTIN-12 or GTIN-13, not a GTIN-14, because no single inner item exists to build on.
  • A case can have its own GTIN-12 instead. It can then be printed in an ITF-14 as 00614141000029.

Don't print GTIN-14s on retail units. GS1 restricts ITF-14 to trade items that don't pass through the retail point of sale.

When you need a new GTIN

GS1's GTIN Management Standard (Release 1.1, ratified September 2023) sets the minimum rules. A change needs a new GTIN only if at least one of these is true: consumers or trading partners are expected to tell the new product from the old one, there's a regulatory or liability disclosure requirement, or the change substantially affects how the product is shipped, stored or received. Brand owners may change GTINs more often than this, and local regulations can require it.

Change New unit GTIN? New case GTIN?
New product (new flavor, new size, a Spanish-only pack of an English product) Yes Yes
Formulation or functionality change that alters legally required pack information and that consumers are expected to notice (for example, an added allergen) Yes Yes
Any change to declared net content, up or down (14 diapers to 12) Yes Yes
Physical dimension or gross weight changes by more than 20% Yes Yes
Certification mark added or removed (kosher, organic, CE) Yes Yes
Primary brand changes Yes Yes
Time-limited promotion (holiday graphics, on-pack coupon) No Yes
Number of units per case, or cases per pallet, changes n/a Yes
An item in a fixed assortment or bundle changes Yes Yes
A price printed on the pack is added, changed or removed Yes Yes

Two details catch people. First, the 20% rule covers dimensions and gross weight only. Any change to declared net content needs a new GTIN, even a small one, and the standard calls repeated small changes made to stay under 20% "an unacceptable practice". Second, announcing a feature the product already had, on new packaging, doesn't need a new GTIN.

GTINs are also permanent. Since January 1, 2019, GS1 rules say a GTIN allocated to a product shall never be reallocated to another one. The main exception is a one-time reuse, after at least 48 months, of GTINs discontinued before that date. For data teams, this means historical records can show one GTIN on two different products, because numbers could be reused under the older rules.

GTIN vs UPC vs EAN in practice

Strictly speaking, the GTIN is the number, and UPC-A and EAN-13 are barcode symbologies that carry it. As GS1 US puts it, "A GTIN does not replace a U.P.C." In everyday use, "UPC" means a 12-digit code, "EAN" means a 13-digit code, and "GTIN" is the umbrella term marketplaces use when either will do. Google Merchant Center, for example, accepts 8, 12, 13 or 14 digits in its gtin field.

Books and compressed codes follow a few extra rules:

  • ISBN-13 is a GTIN-13 in the 978 and 979 ranges. ISBN-10 is not a GTIN until you convert it: put 978 in front of the first nine digits and recalculate the check digit. ISBNs starting with 979 have no ISBN-10 equivalent. BarcodeReport's ISBN lookup accepts either form.
  • UPC-E is a compressed GTIN-12. It's an 8-digit symbol for small packs that expands back to a 12-digit UPC-A. Expand UPC-E codes before storing them, and don't confuse them with EAN-8, which is a separate GTIN-8.
You have Do this Result
UPC-A 036000291452 Add one leading zero EAN-13 0036000291452
EAN-13 0036000291452 It starts with 0, so drop it UPC-A 036000291452
EAN-13 4006381333931 Doesn't start with 0 No UPC-A form exists; GTIN-14 04006381333931
ISBN-10 0-306-40615-2 978 + 030640615, new check digit 9780306406157
ISBN-10 0-8044-2957-X 978 + 080442957, new check digit 9780804429573
Unit 036000291452, indicator 1 Indicator + 12 digits + new check digit 10036000291459 (illustration only)

You can check any of these against real data. On BarcodeReport, an ISBN-10 resolves to the same record as its ISBN-13. Every product page, such as /036000291452, shows the GS1 prefix and issuing country next to the title and brand. Once your numbers are assigned, the free barcode generator produces UPC-A, EAN-13 or ITF-14 artwork. Keep in mind that generating an image doesn't create a GTIN. You need a real number first; we recommend buying UPCs from UPCs.com for $10 per code, a one-time purchase with no renewal fees.

Frequently asked questions

A GTIN is the product number itself, defined by GS1 in 8, 12, 13 or 14 digits. A UPC, properly UPC-A, is the barcode symbol that carries a 12-digit GTIN, and people also use "UPC" to mean that 12-digit number. Every UPC number is a GTIN-12, but not every GTIN is a UPC, because GTIN also covers 8, 13 and 14-digit numbers used outside North America and on cases.

An EAN-13 number is a GTIN-13, so for retail products the two terms usually mean the same thing. EAN-13 is the barcode symbology used on consumer products outside the US and Canada, and it can also carry a UPC-A number with a leading zero added. GTIN is the broader GS1 term that also includes 8, 12 and 14-digit formats, which is why marketplaces ask for a GTIN rather than an EAN.

To store a UPC as a GTIN-14, add two zeros to the front: 036000291452 becomes 00036000291452, and the check digit stays the same. That padded form identifies the same retail unit. A GTIN-14 for a case is different: it uses an indicator digit from 1 to 8 and a recalculated check digit, and only the brand owner can assign one, so you cannot create a valid case code yourself.

The first digit of a GTIN-14 is the indicator digit. Values 1 through 8 distinguish packaging levels such as inner packs, cases and pallets built from the same retail item, and 9 marks a variable-measure product sold by weight or length. A leading 0 means the GTIN-14 is simply a padded GTIN-8, GTIN-12 or GTIN-13 identifying the item itself. The specific digit for each level is the brand owner's choice.

No. Since January 1, 2019, GS1 rules say a GTIN allocated to a product must never be reallocated to a different product, and GTINs still active on that date can never be reused either. The main exception is a one-time reuse, after at least 48 months, of a GTIN discontinued before 2019. Older databases can still contain historical reuse, so a legacy GTIN may point to more than one product over time.

It depends on what changes. GS1's GTIN Management Standard requires a new GTIN when the declared net content changes, a dimension or gross weight changes by more than 20 percent, the primary brand changes, or a certification mark is added or removed. A redesign that triggers none of these rules does not need a new retail GTIN, and a temporary holiday graphic only needs new case-level GTINs.

Next steps