# gtin

The gtin attribute is the globally unique barcode number a manufacturer assigns to a product, covering UPC, EAN, JAN and ISBN formats. Channels use it to match an item against the same product sold elsewhere, and on Shopify it comes from the variant's barcode field, which is optional in the admin and therefore frequently empty.

- **Canonical URL:** https://www.feedlab.io/knowledge/attributes/gtin
- **Last reviewed:** 16 September 2026
- **Source:** feedlab knowledge base
- **Licence:** free to quote and cite with attribution to feedlab


## Specification

| Property | Value |
| --- | --- |
| Attribute | `gtin` |
| Plain name | Global Trade Item Number |
| Data type | Text |
| Limit | 8, 12, 13 or 14 digits |
| Format | Digits only, with no spaces, hyphens or other punctuation. Valid lengths are 8 (EAN-8), 12 (UPC-A), 13 (EAN-13, ISBN-13, JAN) and 14 (ITF-14). The final digit is a check digit calculated from the others, so a transposed digit produces a structurally invalid value that channels reject. Leading zeros are significant and must be preserved. |


### Example values

- `00012345600012`
- `9781234567897`
- `012345678905`



### Support by channel

| Channel | Requirement | Field name | Notes |
| --- | --- | --- | --- |
| Google Shopping | Required in some cases | `gtin` | Required when the manufacturer has assigned one. Omit for genuinely custom goods. |
| Meta | Recommended | `gtin` | Improves matching and is required for some Shops surfaces. |
| Microsoft Advertising | Required in some cases | `gtin` | Expected together with brand unless mpn is supplied. |
| Pinterest | Optional | `gtin` |  |
| OpenAI | Optional | `gtin` | Exactly 8, 12, 13 or 14 digits including a valid check digit. Carry it as a string so leading zeros survive. |












## Frequently asked questions

### Where does the GTIN come from in Shopify?

It comes from the barcode field on each variant, under inventory in the variant editor. It is optional in Shopify and not validated there, so it is commonly blank, padded with spaces, or filled with an internal reference that is not a real GTIN.

### What are the valid GTIN lengths?

Eight digits for EAN-8, twelve for UPC-A, thirteen for EAN-13, ISBN-13 and JAN, and fourteen for ITF-14. Anything else is structurally invalid. Leading zeros count towards the length and must not be stripped.

### What if my products genuinely have no GTIN?

For custom, handmade or own-brand goods with no manufacturer-assigned barcode, supply brand and mpn instead, or set identifier_exists to no. That is a legitimate declaration. Using it to paper over barcodes you simply have not entered causes matching problems rather than solving them.

### Why do my GTINs lose their leading zeros?

Almost always a spreadsheet. Opening a feed in Excel or Sheets coerces a numeric-looking string to a number and discards leading zeros, turning a valid twelve-digit UPC into eleven digits. Generating the feed directly from the catalogue avoids the round trip entirely.




## Primary sources

- [Google: gtin attribute specification](https://support.google.com/merchants/answer/6324461)
- [GS1: GTIN formats and check digit calculation](https://www.gs1.org/services/check-digit-calculator)



