Xerobit

GTIN Check Digit Calculator and Validator

Enter a GTIN to validate its check digit, or type the first digits without the check digit to calculate it. This gtin check digit calculator supports GTIN-8, GTIN-12 (UPC), GTIN-13 (EAN) and GTIN-14 formats. It runs entirely in your browser, so no data is uploaded anywhere.

Result

  • Status
    Valid
  • Format
    GTIN-13 (EAN-13)
  • Check digit
    1
  • GS1 prefix
    400

How to use the gtin validator

  1. Enter a GTIN of 7, 8, 11, 12, 13 or 14 digits into the input field.
  2. If you provide a complete code (8, 12, 13 or 14 digits), the gtin check digit calculator validates it and shows whether the last digit is correct.
  3. If you provide a number without its check digit (7 digits for a GTIN-8 or 11 digits for a GTIN-12), the tool computes the missing check digit and displays the full GTIN.
  4. Review the format row to see whether your code is a GTIN-8, GTIN-12, GTIN-13 or GTIN-14.

How the GTIN check digit is calculated

Every GTIN uses the same modulo-10 algorithm defined by GS1. Starting from the rightmost data digit (the position just before where the check digit will go), multiply each digit alternately by 3 and 1, moving left. Sum all the products. The check digit is the amount needed to round that sum up to the next multiple of 10.

For example, take the first 11 digits of a UPC: 03600029145. Working right to left with weights 3, 1, 3, 1...:

  • 5 x 3 = 15
  • 4 x 1 = 4
  • 1 x 3 = 3
  • 9 x 1 = 9
  • 2 x 3 = 6
  • 0 x 1 = 0
  • 0 x 3 = 0
  • 0 x 1 = 0
  • 6 x 3 = 18
  • 3 x 1 = 3
  • 0 x 3 = 0

The sum is 58. The next multiple of 10 is 60, so the check digit is 60 minus 58, which equals 2. The full GTIN-12 is therefore 036000291452.

GTIN formats at a glance

The Global Trade Item Number family covers several lengths used around the world. Each length has a common name you may recognize from retail or logistics.

FormatDigitsCommon nameTypical use
GTIN-88EAN-8Small packages where space is limited
GTIN-1212UPC-ARetail products in North America
GTIN-1313EAN-13Retail products worldwide
GTIN-1414ITF-14 / GS1-128Cartons, pallets and logistics units

A GTIN-12 can always be expressed as a GTIN-13 by adding a leading zero, and any shorter GTIN can be padded to 14 digits for database storage. The check digit algorithm remains identical regardless of length.

Understanding the GS1 prefix

The first few digits of a GTIN-13 or GTIN-14 form the GS1 Company Prefix, which identifies the country or region of the GS1 member organization that issued the number. For instance, prefixes 000 through 139 are assigned to GS1 US, 400 through 440 to Germany, and 690 through 699 to China.

It is important to note that the prefix indicates where the company registered its numbering, not necessarily where the product was manufactured. A product made in Vietnam could carry a US prefix if the brand owner registered through GS1 US. When you use this gtin check digit calculator, the prefix is part of the validated number but does not by itself prove origin.

Common mistakes when entering GTINs

Data entry errors are the most frequent reason a GTIN fails validation. Watch out for these issues:

  • Transposed digits. Swapping two adjacent digits almost always changes the check digit result, which is exactly what the algorithm is designed to catch.
  • Leading zeros dropped. Spreadsheet software often strips leading zeros from numeric columns, turning a 12-digit UPC into an 11-digit string. Always store GTINs as text.
  • Confusing GTIN-12 and GTIN-13. Entering a 12-digit UPC into a system expecting 13 digits without padding a leading zero will produce a mismatch.
  • Non-numeric characters. Spaces, hyphens or letters invalidate the code. Remove them before checking.

If you need to generate barcodes after validating your numbers, a dedicated barcode generator can encode the GTIN into a scannable symbol like EAN-13 or ITF-14.

Where GTIN validation matters

Retailers, marketplaces and shipping platforms routinely reject products whose GTINs fail the check digit test. Marketplaces such as Amazon, Walmart and Google Shopping ask for valid GTINs on most product listings. In warehouse management systems, a single mistyped digit can route inventory to the wrong bin or trigger a receiving discrepancy.

Using a gtin check digit calculator before uploading bulk product feeds prevents listing rejections and saves time. Because the validation math is lightweight, this tool processes your input instantly in the browser without sending data to a server, making it safe for proprietary product codes.

Worked examples

ExampleInputResult
Validate EAN-13GTIN number: 4006381333931Status: Valid; Format: GTIN-13 (EAN-13); Check digit: 1; GS1 prefix: 400
Calculate UPC-12 check digitGTIN number: 03600029145Check digit: 2; Full GTIN: 036000291452; Format: GTIN-12 (UPC-A); Digits entered: 11
Validate GTIN-14GTIN number: 10012345678902Status: Valid; Format: GTIN-14; Check digit: 2; GS1 prefix: 001
Calculate EAN-8 check digitGTIN number: 9638507Check digit: 4; Full GTIN: 96385074; Format: GTIN-8 (EAN-8); Digits entered: 7

FAQ

What is a GTIN check digit?

The check digit is the last digit of a GTIN. It is computed from the preceding digits using a modulo-10 formula so that scanners and databases can detect typing or scanning errors.

Can I enter a GTIN without the last digit?

Yes, for GTIN-8 and GTIN-12. If you enter 7 or 11 digits, the gtin check digit calculator computes the missing final digit and shows the complete GTIN. A 12 or 13 digit entry is treated as a complete GTIN-12 or GTIN-13 and validated, so to find the check digit of a 13 or 14 digit code, use the EAN-13 barcode generator, which accepts 12 digits.

Is a UPC the same as a GTIN?

A UPC-A code is a 12-digit GTIN (GTIN-12). The term GTIN is the umbrella standard that also includes 8-digit EAN-8, 13-digit EAN-13 and 14-digit logistics codes.

Why did my GTIN fail validation?

The most common causes are transposed digits, dropped leading zeros or extra non-numeric characters. Double-check the number against the original source or packaging.

Does the prefix tell me where a product was made?

No. The GS1 prefix identifies the country where the company registered its numbering, not the manufacturing location.

Can I use this tool for ISBN numbers?

ISBN-13 numbers share the same EAN-13 structure and check digit algorithm, so this tool can validate them. Older ISBN-10 numbers use a different modulo-11 scheme and are not supported here.

Is my data sent to a server?

No. All validation and calculation happens locally in your browser. Nothing you type is uploaded anywhere.