Browse the guides

A leading zero in a product code: preserve the identifier

Save a GTIN as text, retain its original length and keep any required 14-digit representation in a separate field.

A shopping spreadsheet can damage a product identifier before you compare a single nutrient. If a cell treats barcode digits as an ordinary number, a zero at the beginning may disappear. The shortened value can look tidy while no longer preserving what the package actually printed.

Keep the package text first

Use a text field for the copied identifier. The GS1 explanation of GTIN, UPC and EAN terminology identifies GTIN-12 as the 12-digit format commonly called UPC, and GTIN-13 as the format commonly called EAN or JAN. Those names do not justify removing digits from an observed code.

For this invented record, suppose a package clearly displays the 12 digits 012345678905. The number is only an illustration; no real product, licensed owner or barcode scan has been verified.

FieldValue to saveReason
Original code text012345678905Retains all 12 observed digits
Observed formatGTIN-12, if establishedDocuments the source interpretation
14-digit representation, when required00012345678905Adds two filler zeroes without changing the original field

Padding is a defined representation step

GS1's guidance on GTIN lengths explains that applications requiring a uniform 14-digit format add leading zeroes to shorter GTINs. In the example, the first zero already belongs to the original 12-digit text; the other two were added to meet that particular storage requirement. Record the transformation rather than replacing your evidence.

This does not mean every form, barcode symbol or data exchange accepts the same representation. Follow the destination's stated requirement. Do not pad an unknown retailer code and announce that it has become a GTIN, or expand a shortened barcode format by guessing where zeroes belong.

Run a save-and-reopen check

  1. Set the destination column to text before entering or importing the code.
  2. Copy the readable package digits and retain the source photograph.
  3. If another system requires 14 digits, create a separate derived field after establishing the original format.
  4. Save and reopen the exported file, checking the actual character sequence and length against the original.

If the exported value has already become 12345678905, return to the photograph. An 11-digit fragment does not tell you which character was lost. Adding a zero may repair this particular example, but it is not a reliable reconstruction rule for an unknown record.

For the food-label reading that follows identification, explore Ingredi AI through its official Apple listing or official Google Play listing. Download it if available for your device, and check captured information against the package. This guide does not establish an app's barcode-import or GTIN-normalization capabilities.

Sources

Compare labels