UPC vs EAN-13 vs GTIN-14: is my 12-digit code the same item?

LabelCraft - barcode labels for Shopify that print at exactly the size you set.

EN · FR · DE · ES
The guarantees behind every label
Exact to ±0.1 mm

Every label prints at the size you set - measured, not approximate.

Never a silent failure

Overflow or a missing barcode always raises a visible warning before you print.

Whole-dot barcodes

Modules snap to your printer's dots, so codes stay crisp and scan first time.

Your barcodes, untouched

We never overwrite or reassign a product's existing barcode.

You scan a product and get a 12-digit number. Your Shopify catalogue stores a 13-digit one. The carton says 14 digits. Three different lengths, and - very often - the exact same item. UPC-A, EAN-13 and GTIN-14 are not rival formats; they are one number written at different widths, and the only difference is leading zeros.

One GTIN, four lengths

Every retail barcode number is a GTIN (Global Trade Item Number). GS1 defines it in four lengths - GTIN-8, GTIN-12 (a UPC-A), GTIN-13 (an EAN-13) and GTIN-14 (an ITF-14 carton code). Leading zeros in a GTIN are not significant: padding a shorter form with zeros on the left gives a longer form of the very same item, and the check digit does not change.

The canonical form

To tell whether two codes are the same item, strip the leading zeros from each and compare what is left. LabelCraft calls that the canonical form. A 13-digit EAN-13 stored as 0012345678905 has the canonical form 12345678905 - and so do its 12-digit and 14-digit forms. All of these are the same product:

Why the leading zero disappears

Spreadsheets are the usual culprit. Open a barcode column in Excel or Google Sheets and a UPC stored as 012345678905 is read as a plain number and re-saved as 12345678905 - one digit shorter. Paste that back into Shopify and the stored barcode no longer matches the printed one. Always keep barcode columns formatted as text, and check the length before you import.

When two codes are NOT the same

The fold is deliberately conservative. Only an all-digit value of at least 8 digits is treated as a GTIN; a Code 128 value where leading zeros ARE meaningful is never folded, and an all-zero placeholder is never matched to another all-zero string of a different length. LabelCraft would rather leave two codes unmatched than silently merge two different products.

How LabelCraft matches them during receiving

When you receive stock or import a supplier list, the scan or the spreadsheet rarely uses the same length as your stored barcode. LabelCraft folds both to their canonical form, so a 12-digit scan matches the 13-digit EAN-13 in your catalogue and the right label prints. If a code folds to more than one variant it is surfaced as ambiguous rather than guessed - the same never-silent rule that runs through the whole app.

Install free - 200 labels per month →

Related: the GTIN check digit, SKU vs barcode, why a barcode won't scan - or contact LabelCraft support.

Related guides