What is a GTIN? UPC, EAN & GS1 barcode standards
GTIN is the umbrella number that ties UPC-A, EAN-13, EAN-8 and case codes into a single system. This guide explains the four GTIN lengths, how they relate, and how to store them safely.
What GTIN actually means
GTIN stands for Global Trade Item Number. It is the identifier that GS1, the standards body behind retail barcodes, assigns to a trade item. Any buyer or seller can then refer to the same product without confusion. A GTIN is just a number. The barcode you scan is only a way of printing that number so a machine can read it.
The key idea is that GTIN is an umbrella. UPC and EAN are not competitors to GTIN. They are specific lengths and encodings that all fall under the GTIN system. When you understand GTIN, UPC and EAN stop looking like separate schemes and start looking like members of one family.
Take a concrete case. A can of soda sold in the United States carries a 12-digit GTIN-12 printed as a UPC-A. The same drink sold in Germany carries a 13-digit GTIN-13 printed as an EAN-13. Different lengths, different barcodes, but both are GTINs drawn from the one numbering system, and both can be stored and compared as 14-digit values.
This is why treating UPC and EAN as rival standards causes so many data problems. They are not rivals. They are two widths of the same identifier. Once you see them that way, you remove duplicates from a mixed catalog by padding, not by guessing.
The four GTIN lengths
GTIN comes in four fixed lengths, and the digit count is in the name:
- GTIN-8 is 8 digits, encoded as an EAN-8 barcode. It is used on small packs where a full-size barcode does not fit.
- GTIN-12 is 12 digits, encoded as a UPC-A barcode. This is the format you see across North American retail.
- GTIN-13 is 13 digits, encoded as an EAN-13 barcode. This is the global default outside the United States and Canada.
- GTIN-14 is 14 digits, usually encoded as an ITF-14 barcode on cases and cartons rather than on the consumer unit.
Every one of these ends in a single check digit that is calculated from the digits before it. That check digit is what lets a scanner reject a misread. You can confirm one with the EAN-13 check digit calculator or the UPC check digit calculator.
| GTIN | Digits | Barcode | Typical use |
|---|---|---|---|
| GTIN-8 | 8 | EAN-8 | Small packs where a full barcode does not fit |
| GTIN-12 | 12 | UPC-A | North American retail units |
| GTIN-13 | 13 | EAN-13 | Retail units outside the US and Canada |
| GTIN-14 | 14 | ITF-14 | Cases and cartons, not the consumer unit |
A GTIN is not a barcode. It is the number the barcode encodes.
Barcodes.gg
Why leading zeros matter
Because all four lengths belong to one system, a shorter GTIN can be expressed as a longer one by adding zeros on the left. A 12-digit UPC-A becomes a valid GTIN-13 by prepending a single zero, and any GTIN becomes a GTIN-14 by padding to 14 digits. The number does not change in meaning. Only the storage width changes.
This is why GS1 recommends storing every GTIN in a single 14-digit field, left-padded with zeros. Doing so means a UPC-12, an EAN-13 and a case code all live in the same column and can be matched directly. If you need to move between formats, the GTIN converter handles the padding and recomputes the check digit for you.
Store every GTIN in one 14-digit column, left-padded with zeros. A UPC-12, an EAN-13 and a case code then share a single key. The same product cannot enter your catalog twice under two different widths.
Where UPC and EAN fit
UPC-A is the 12-digit format, so it is identical to a GTIN-12. EAN-13 is the 13-digit format, so it is identical to a GTIN-13. A UPC-A padded with one leading zero is a valid EAN-13, which is why a scanner in Europe reads a North American product without trouble.
Do not treat a UPC and an EAN as different products just because the strings look different. Normalize both to 14 digits and compare. GTIN vs UPC covers the difference in more detail. EAN-13 format explained covers the structure of the 13-digit form.
Validating and generating GTINs
Two operations cover most day-to-day work. First, validation: given a number, is it a well-formed GTIN with a correct check digit? Run it through the barcode validation tool to catch typos, truncated values and bad check digits before they reach a listing. Second, generation: given a GS1-assigned company prefix and item reference, produce a scannable image with the barcode generator.
To build this into a system, read the API documentation. It shows how to validate and look up numbers from your own code. You can see a live product record at an example page such as this GTIN lookup.
Frequently asked questions
Is a GTIN the same as a barcode?
No. A GTIN is a number that identifies a product. A barcode is a printed pattern that encodes that number so a scanner can read it. UPC-A and EAN-13 are two barcode symbologies that carry GTIN values.
Do I need a different GTIN for every product size?
Yes. Each distinct consumer unit, including each size, color or flavor variant, needs its own GTIN. Cases and cartons that group those units get their own GTIN-14.
Where do GTINs come from?
A brand licenses a GS1 company prefix from GS1, then assigns its own item references under that prefix and adds a check digit. The result is a globally unique GTIN.
Try the tools
Related reading
UPC vs EAN vs GTIN: what is the difference
UPC is not an alternative to GTIN. A UPC-A barcode carries a 12-digit GTIN-12, so UPC is one member of the wider GTIN family.
EAN-13 format explained: structure & prefixes
An EAN-13 barcode is a 13-digit GTIN-13 built from a GS1 prefix, a company prefix, an item reference and a check digit.
GTIN-14 explained: cases, cartons & pallets
GTIN-14 identifies a packaging level such as a case or carton by adding an indicator digit in front of the base product GTIN.
How to validate a barcode: UPC, EAN & GTIN
A practical guide to checking that a UPC, EAN, or GTIN is well formed before you trust it.