GTIN, UPC and EAN Barcodes Explained
By Selling Fee Tools team ·
Amazon, Google Merchant Center and most retailers ask for a GTIN for each product. This guide explains the numbers, the check digit that catches typos, and how to print a barcode that scans. Everything here follows the GS1 General Specifications (Release 26.0), the standard behind every retail barcode.
GTIN, UPC and EAN: the same family
GTIN (Global Trade Item Number) is GS1’s name for the whole family of product numbers. The names you see on marketplaces are its formats:
| Format | Digits | Common name | Used for |
|---|---|---|---|
| GTIN-12 | 12 | UPC-A | Products, mostly in the US and Canada |
| GTIN-13 | 13 | EAN-13 | Products in most other countries |
| GTIN-8 | 8 | EAN-8 | Very small packs |
| GTIN-14 | 14 | Case or carton code | Outer cases and cartons |
A UPC-A is an EAN-13 with a leading zero left off: 012345678905 and 0012345678905 are the same product. Feeds and catalogues often store every GTIN as 14 digits by padding with zeros, which doesn’t change it.
How the check digit works
The last digit is calculated from the others, so a mistyped or misread digit is almost always caught. Starting from the right of the number without its check digit, multiply the digits by 3, 1, 3, 1 and so on, add them up, and the check digit is whatever takes the sum to the next multiple of ten.
For the EAN-13 400638133393_:
- From the right: 3×3, 9×1, 3×3, 3×1, 3×3, 1×1, 8×3, 3×1, 6×3, 0×1, 0×3, 4×1
- That is 9 + 9 + 9 + 3 + 9 + 1 + 24 + 3 + 18 + 0 + 0 + 4 = 89
- The next multiple of ten is 90, so the check digit is 1: 4006381333931
If the number had been typed as 4006381333932, the check digit wouldn’t match and the barcode would be rejected.
Where valid numbers come from
A correct check digit only proves the number is well formed. Whether it belongs to your product depends on the GS1 Company Prefix at its start, which a GS1 member organisation licenses to a brand. Marketplaces and Google Merchant Center can check a GTIN against GS1 records, so only use numbers issued to your brand or by the manufacturer of what you sell.
Some prefixes are never valid for products sold online:
- 02, 04 and 20–29 are for restricted circulation: numbers used inside one company or region, such as in-store codes for weighed produce.
- 952 is reserved for examples and demonstrations, which is why we use it in our tools.
A common mistake comes from spreadsheets: they treat GTINs as numbers and drop leading zeros, so the UPC 012345678905 becomes 12345678905. Format the column as text before pasting, or check the list with a tool that restores the zero.
Printing a barcode that scans
The GS1 specifications set the size of the X-dimension, the width of the narrowest bar:
- 0.33 mm is the nominal size. At that width an EAN-13 or UPC-A is 37.29 mm wide including its margins, with bars 22.85 mm tall (EAN-8: 26.73 mm and 18.23 mm).
- For retail checkouts the X-dimension can go from 0.264 mm (80%) to 0.66 mm (200%), and the bar height scales with it. Bars cut shorter than that are “truncated” and may not scan from every angle.
- Each barcode needs a blank Quiet Zone on both sides: 11 modules on the left and 7 on the right for EAN-13, 9 on each side for UPC-A, 7 for EAN-8 and 10 for Code 128. Don’t crop it or print over it.
For artwork, use a vector file (SVG) at the exact size. For a label printer, use a PNG at the printer’s resolution (many thermal label printers print at 203 dpi), with each bar a whole number of pixels so the edges stay sharp.
Code 128 for your own labels
Code 128 isn’t a product number: it can carry any text, such as a SKU, a bin location or the FNSKU label Amazon asks FBA sellers to print. It is the barcode to use for anything internal, where a GTIN would be wrong.
Tools
- GTIN, UPC & EAN check digit calculator: check a list of codes in bulk, find the correct check digit, or generate codes from your GS1 Company Prefix
- Barcode Generator: EAN-13, UPC-A, EAN-8 and Code 128 barcodes at GS1 sizes, as SVG or PNG
- Google Merchant Center feed validator: checks the GTINs in a product feed along with every other required attribute
Source: GS1 General Specifications, Release 26.0, sections 1, 5 and 7, listed on each tool and on our methodology page.