Free tool
GTIN, EAN and UPC validator
This validator checks whether a barcode is a structurally valid GTIN: the right length for EAN-8, UPC-A, EAN-13 or ITF-14, and a check digit that matches the digits before it. It accepts a whole column pasted from a catalogue at once.
Paste one identifier per line, or a column copied straight out of a spreadsheet. Each value is checked for length and for its check digit, and where a code is one digit short the correct check digit is calculated for you.
Runs entirely in your browser. Nothing you paste is uploaded or stored.
Validate identifiers
- Checked
- Valid
- Invalid
| Value | Result | Detail |
|---|---|---|
Frequently asked questions
What makes a GTIN valid?
Two things: a length of 8, 12, 13 or 14 digits, and a final check digit that matches a calculation over the digits before it. Anything else is not a GTIN, whatever else it might be.
How is the GTIN check digit calculated?
Working right to left from the digit before the check digit, each digit is multiplied alternately by 3 and 1 and the results are added. The check digit is whatever is needed to bring that total up to the next multiple of ten.
Why does my barcode fail when it looks right?
Usually a lost leading zero or a transposed pair of digits. A spreadsheet strips the zero, which shortens the value, and a typo keeps the length correct while breaking the check digit.
Is an ISBN a GTIN?
An ISBN-13 is, and it validates here. An ISBN-10 is not a valid GTIN length: prefix it with 978 and recalculate the check digit to convert it.
What should I do with the invalid values?
Do not send them. An invalid identifier is treated as an error while a missing one is only a warning, so route those products to brand with mpn instead, or declare identifier_exists where they genuinely have no barcode.
Attributes this relates to
- 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.
- mpn The mpn attribute is the part number a manufacturer uses to identify a product in its own catalogue, and it serves as the fallback identifier when an item has no GTIN. Unlike a GTIN it is only unique within one manufacturer, so it is meaningless to a channel unless the brand attribute is supplied alongside it.
- identifier_exists The identifier_exists attribute is an explicit declaration that a product has no manufacturer-assigned identifiers, set to no when a GTIN, MPN and brand genuinely do not exist for the item. It is a statement about the product, not a way to silence identifier warnings, and channels treat misuse as a data quality problem rather than a resolution.
Errors this helps you avoid
- Invalid value: GTIN The "Invalid value: GTIN" error means the feed supplied a value in the gtin attribute that is not a structurally valid Global Trade Item Number. Unlike a missing GTIN this is usually a disapproval rather than a warning, because a wrong identifier matches the item to the wrong product rather than to none.
- Missing value: GTIN The "Missing value: GTIN" issue means a channel believes a product has a manufacturer-assigned barcode but the feed did not supply one. On Shopify it almost always traces back to the variant barcode field, which is optional in the admin and therefore left empty across large parts of most catalogues.
Related concepts
Primary sources
Channel specifications change. These are the official documents this page is based on.