Shample Intel
Menu
Catalog quality guide

Do not assume every twelve-digit code needs an EAN zero

Compare checksum-valid 12- and 13-digit synthetic identifiers and see why EAN restoration requires an explicit source format.

IdentifiersUpdated Guide slug: upc-a-versus-ean-13

The issue to look for

A twelve-digit spreadsheet field may already be a complete UPC-A. Treating it as a damaged EAN-13 can silently change the representation expected by a downstream system.

What this check can tell you

Both formats are run through the same parser without changing their lengths. The output demonstrates that checksum validation cannot choose a missing source format for you.

A transparent review

  1. Check whether the original field specification says UPC-A, EAN-13, GTIN-14, or a mixed-format identifier.
  2. Run the two-row fixture and compare the preserved 012345678905 and 0012345678905 strings.
  3. Keep the format and pack context alongside any deliberate canonical representation.
  4. If an EAN field was shortened, restore from the original export rather than applying a rule to every twelve-digit row.

How to read the result

  • Leading-zero representations can share a valid checksum because the extra leading zero contributes nothing to the weighted sum. A passing result therefore does not resolve the original width.
  • The neutral cleaner validates supported complete GTIN lengths and preserves them. It does not globally convert UPC-A to EAN-13, restore a missing EAN zero, or decide which representation a marketplace requires.

Limits to keep in view

  • No GS1 issuance, ownership, or product-equivalence lookup is performed.
  • Some receiving systems impose additional formatting rules.
  • A thirteen-digit code is not necessarily a retail unit instead of a case.
Illustrative sample

Synthetic fixture: synthetic-upc-or-ean.csv

This small synthetic example makes the transformation and observation visible. It is an educational illustration, not a claim that a supplier file or external registry was verified.

Fixture ID
upc-or-ean
Published fixture reference
upc-or-ean
Filename
synthetic-upc-or-ean.csv
Encoding
UTF-8
Options
{"repairUpcs":true,"removeZeroStock":false,"removeZeroCost":false}

Input

UPC,SKU
012345678905,FORMAT-12
0012345678905,FORMAT-13

Output

{
  "checks": {
    "validIdentifiers": 2,
    "repairCount": 0
  },
  "cleanedRows": [
    {
      "UPC": "012345678905",
      "SKU": "FORMAT-12"
    },
    {
      "UPC": "0012345678905",
      "SKU": "FORMAT-13"
    }
  ]
}

Observation: Both complete synthetic identifiers pass their length/checksum tests. Neither is padded or shortened.

Download synthetic fixture

Sources