The GTIN check digit, and why your barcode won't scan without it
LabelCraft - barcode labels for Shopify that print at exactly the size you set.
Every label prints at the size you set - measured, not approximate.
Overflow or a missing barcode always raises a visible warning before you print.
Modules snap to your printer's dots, so codes stay crisp and scan first time.
We never overwrite or reassign a product's existing barcode.
Check a barcode
8, 12, 13 or 14 digits. Spaces and hyphens are ignored.
Enter a barcode above to check its check digit.
Every retail barcode number - an EAN-13, a UPC-A, an ITF-14 carton code - ends in a single check digit that is calculated from all the digits before it. It is not a free choice: it is a small checksum that lets a scanner confirm it read the number correctly. Type one digit wrong and the check digit no longer matches, so a compliant scanner rejects the whole code rather than report the wrong product.
What a check digit is
A GTIN (Global Trade Item Number) is the numeric value behind a retail barcode. The final digit is derived from the others by a fixed formula, so the number carries its own error check. When a scanner decodes the bars it recomputes the check digit from the digits it read; if the result doesn't equal the last digit, the read is discarded. That is why a barcode with a bad check digit doesn't scan as the wrong item - it usually doesn't scan at all.
How the GTIN check digit is calculated
GS1 uses a modulo-10 checksum. Working from the right-hand data digit toward the left, each digit is multiplied by 3, then 1, then 3, then 1, and so on. The products are added up, and the check digit is whatever you must add to that total to reach the next multiple of ten:
- Write out the data digits (the GTIN without its final check digit).
- Starting from the rightmost data digit, multiply the digits alternately by 3, 1, 3, 1 …
- Add all the products together to get a sum.
- The check digit is
(10 - (sum mod 10)) mod 10- the amount that rounds the sum up to a multiple of 10.
For the 12 data digits 400638133393, the weighted products are 3·3 + 9·1 + 3·3 + 3·1 + 3·3 + 1·1 + 8·3 + 3·1 + 6·3 + 0·1 + 0·3 + 4·1 = 89. 89 to the next ten is 90, so the check digit is 1 and the full GTIN-13 is 4006381333931. The same rule produces the last digit of every UPC-A, EAN-8 and ITF-14.
The standard GTIN lengths
- GTIN-8 (EAN-8) - 8 digits, for very small packs where a full EAN-13 won't fit.
- GTIN-12 (UPC-A) - 12 digits, the North American retail standard.
- GTIN-13 (EAN-13) - 13 digits, the global retail standard.
- GTIN-14 (ITF-14) - 14 digits, for cartons and cases of multiple units.
All four are the same kind of number with the same kind of check digit; they differ only in length. A 12-digit UPC-A is the same item as its 13-digit EAN-13 form with a leading zero - the check digit doesn't change when you pad with leading zeros.
The leading-zero trap
Spreadsheets love to drop leading zeros: a UPC stored as 012345678905 gets silently turned into 12345678905 the moment Excel treats the column as a number. Re-import that and the barcode is now one digit short and the wrong value entirely. Leading zeros in a GTIN are not significant - the same item can be written 8, 12, 13 or 14 digits long - but the digits that ARE there have to be correct. Always store barcode columns as text, and check the length before you print.
Why a bad check digit becomes a one-star review
A label that looks perfect but carries an invalid GTIN is the worst kind of print: it only fails at the till or in receiving, after the roll is already stuck on the products. The scanner beeps red, someone keys the number by hand, and the merchant blames the label app. On a barcode you intend to scan, getting the check digit right is not optional.
How LabelCraft keeps your check digit valid
LabelCraft computes and verifies the check digit with the exact GS1 mod-10 rule above. Generate missing barcodes always produces a valid GTIN-13 (or a self-assigned Code 128 when you have no GS1 prefix), check digit included. Barcode check scans your catalogue for codes whose check digit doesn't add up and flags them before you print, and the render engine never silently prints a value it knows is invalid - a wrong-scan code is the one mistake a label app must never make quietly.
Install free - 200 labels per month →
Related: why a barcode won't scan, GS1 barcodes and GTINs, SKU vs barcode - or contact LabelCraft support.
Related guides
- Shopify Barcode Labels — Complete Guide
- Shopify barcode label FAQ
- Print Shopify Barcode Labels When Your Products Have No Barcode Yet
- How to Add Barcodes to Shopify Products in Bulk
- SKU vs Barcode in Shopify — What's the Difference and Do You Need Both?
- Where to Get UPC/EAN Barcodes for Shopify — GS1 vs Resellers, and What You Actually Need
- Free barcode generator for Shopify
- GS1 Barcodes & Valid GTINs for Shopify
- My barcode is invalid - how do I fix the check digit?
- Find and fix duplicate barcodes in Shopify
- Shopify barcode types: which format should you print?
- What country is a barcode from? GS1 prefixes explained
- Restricted & in-store barcodes: why they scan at your till but get rejected
- QR Code & Data Matrix Labels for Shopify
- UPC vs EAN-13 vs GTIN-14: is my 12-digit code the same item?
- Barcode lost its leading zero in Excel - get the UPC back
- What Can a Label App Read in Your Store?