2D Ready

GTIN check digit calculator

The last digit of every GTIN is a mod-10 check digit computed from the others. Paste codes below to validate them or reveal the check digit.

Mode
InputGTIN-14Check digitStatus

About GTIN check digits

Every GTIN — the 8, 12, 13 or 14-digit number behind EAN-8, UPC-A, EAN-13 and GTIN-14 barcodes — ends in a single check digit. It is not part of the product's identity; it is arithmetic, calculated from every digit that comes before it using the GS1 mod-10 algorithm, and its only job is to catch typos and scanner misreads before they reach your systems.

The calculation starts at the digit immediately to the left of the check digit and works leftward, multiplying digits alternately by 3 and then 1. Add the weighted digits together, then find the smallest number you would need to add to reach the next multiple of 10 (0 if the sum is already a multiple of 10); that is the check digit. Because every digit position carries a different weight, changing any single digit in the code changes the weighted sum by an amount that is never a multiple of 10, so the resulting check digit always changes too. That is why the algorithm catches every single-digit error, and — because neighbouring digits are almost always weighted differently, 3 versus 1 — it also catches the overwhelming majority of transposition errors, where two adjacent digits get swapped. The only transpositions it misses are pairs of digits exactly 5 apart, such as 0 and 5, sitting in adjacent weight positions — a known, accepted limitation of any single mod-10 digit.

GTIN length matters for the calculation, not just for storage: a GTIN-8, UPC-A (effectively a GTIN-12), EAN-13 (GTIN-13) and GTIN-14 all compute their check digit over a body of 7, 11, 12 or 13 digits respectively, so the same product can carry differently-shaped codes depending on which format it started life in. GS1 systems normalise everything to 14 digits by left-padding with zeros — a 13-digit EAN and its zero-padded GTIN-14 equivalent identify the same product despite their different lengths. This tool always shows both the original input and its normalised GTIN-14 form so you can see that conversion happen.

Use Validate mode when you already have a full code — GTIN-8, UPC-A, EAN-13 or GTIN-14, check digit included — and want to confirm it is correct. Use Compute mode when you only have the body of the code, a 7, 11, 12 or 13-digit number with the check digit stripped off, and need this tool to work out what that final digit should be.

Once you have a valid GTIN, the next step for GS1 Digital Link and 2D barcodes is turning it into a resolvable URI — try the Digital Link builder.