Skip to content
UDImakerOpen editor

GTIN-13 to GTIN-14: Leading Zeros and Check Digits Explained

Represent a GTIN-13 in a 14-digit GS1 field, preserve leading zeros, and follow a worked Modulo-10 check-digit calculation.

To represent an existing GTIN-13 in the 14-digit field of GS1 AI (01), add one leading zero. Keep its existing check digit. This is a padded representation of the same identifier, not allocation of a new packaging-level GTIN.

Follow the number through each representation

Take the demonstration GTIN-13 9506000134352. Its 14-digit representation is 09506000134352. When displayed with its Application Identifier, the HRI is (01)09506000134352.

These three strings serve different purposes. The AI digits 01 describe the field; they are not part of the GTIN. The parentheses are display notation. Enter only the 14 digits in UDImaker's GTIN field.

Padding must not be confused with selecting a nonzero packaging indicator and allocating a different identifier. Adding a zero does not establish a new case or carton identity. Obtain packaging-level identifiers through the appropriate assignment process.

Check the arithmetic

For the 14-digit example, separate the last check digit 2 from the 13-digit payload 0950600013435.

  1. Starting at the rightmost payload digit, apply alternating weights of 3 and 1 as you move left.
  2. Add the weighted values. For this payload, the sum is 78.
  3. Find the digit that makes the total a multiple of ten: 78 + 2 = 80.
  4. Confirm that the original identifier ends in 2.

Adding a leading zero contributes zero to the sum and preserves the right-aligned weighting. It therefore leaves the existing check digit unchanged. Use the official calculator linked below when checking another assigned number.

Prevent spreadsheet and import errors

Store identifiers as text rather than quantities. A numeric cell may remove leading zeros, and a later export may preserve the shortened value. After moving data between systems, compare the actual character string, not only the cell's visual number format.

Useful checks include:

  • Is the AI (01) value exactly 14 digits?
  • Is the leading zero still present in the exported data?
  • Does the check digit match the complete number?
  • Does the identifier belong to the intended item and packaging level?

The last question requires master-data evidence. Correct arithmetic does not establish ownership or assignment.

Use the prepared value

Enter the padded value into the GS1 DataMatrix generator, then compare its readable text and decoded output. The Application Identifier guide explains where lot and serial fields fit.

Replace demonstration identifiers before production. UDImaker checks selected input properties; it does not license GS1 numbers or turn a number with a correct check digit into an assigned product identifier.

Sources and technical review

Relevant primary references are listed below. These guides explain the design workflow; confirm current sector requirements and local regulations before production use.