Guide ยท Google Merchant Center GTIN errors
Merchant Center says your barcode is invalid? Check for the missing leading zero.
If Google flags "Invalid value [gtin]" on products whose barcode looks right in Shopify, the most common cause is not the barcode. It is the spreadsheet the barcode passed through.
What happens
Most US barcodes are 12-digit UPCs, and plenty of them start with 0. When a product export is opened in Excel or Google Sheets, the barcode column is read as a number, and numbers do not keep leading zeros. Save the file, import it back into Shopify, and every one of those barcodes is now 11 digits. Google accepts GTINs of 8, 12, 13 or 14 digits only, so an 11-digit value is rejected. Longer codes can fare worse: a spreadsheet may show them in scientific notation, like 8.85909E+11, and saving that version throws the real digits away.
How to see it in your own file
Export your products from Shopify (Products, Export, Plain CSV file) and open the file in a text editor, not a spreadsheet. Look at the Variant Barcode column and count the digits. Eleven digits where you expect twelve, or anything with an E+ in it, is this problem.
How the check digit tells you the fix is right
The last digit of every GTIN is a check digit calculated from the others (the GS1 mod 10 rule). Starting from the right of the other digits, multiply them alternately by 3 and 1, add everything up, and the check digit is whatever brings the total to the next multiple of 10. For 036000291452 the first eleven digits give 58, so the check digit is 2, which matches. That is why restoring a single leading zero is safe when the result passes the check, and why a value that fails it must not be "fixed" by guessing.
Examples
| Value in the file | What it is | Verdict |
|---|---|---|
| 036000291452 | A correct 12-digit UPC. | Valid. Leave it. |
| 36000291452 | The same UPC after a spreadsheet dropped the leading zero. | Repairable. Check it against the package, then restore. 036000291452 |
| 8.85909E+11 | A barcode a spreadsheet turned into scientific notation. | Not repairable from the file. Needs the real barcode. |
| 036000291453 | One digit mistyped. | Not repairable from the file. Needs the real barcode. |
| 212345678909 | An in-store code starting with 2. | Not repairable from the file. Needs the real barcode. |
Verdicts on this page are produced by the same rules the scanner runs.
When not to fix it yourself
- The check digit fails: a digit is mistyped somewhere and only the package knows which.
- The code starts with 02, 04 or 2 (in-store or weighed items) or 05, 98, 99 (coupons). Google treats these as restricted. Use the manufacturer's GTIN or leave the field empty.
- The product genuinely has no barcode (handmade, print on demand). Do not invent one. Mark it as a custom product so Google is told it has no identifiers.
Keep it from happening again
Edit barcodes in Shopify admin directly, or when you must use a spreadsheet, import the CSV with the barcode column set to Text before you touch it.
Sources: Google's GTIN attribute and restricted GTIN help pages.
Checking hundreds of barcodes by hand is slow. The free scan does every variant in your export at once and shows which ones can be repaired from the file.
Run the free scan