Canadian · Validation

GLN / SSCC / GTIN check digit validator.

Validate the check digit of a GS1 identification key: GTIN-8, GTIN-12, GTIN-13, GTIN-14, a 13-digit GLN (Global Location Number), a 17-digit GSIN or an 18-digit SSCC (shipping container code). Or enter the number without its check digit to have it computed. Everything runs in your browser: nothing you type is transmitted anywhere.

Source: GS1 General Specifications, Release 26.0, section 7.9.1 Checks the check digit only, not whether the number is registered to anyone

Advertisement

Inputs

What are you entering?
Enter the complete number, including its check digit. Spaces and hyphens are ignored.

Result

Enter a number and press Check.

Advertisement

How the GS1 check digit works

GS1 states that one check digit algorithm is “identical for all fixed length numeric GS1 data structures” that carry a check digit, including GTIN-8, GTIN-12, GTIN-13, GTIN-14, the 13-digit GLN, the 17-digit GSIN and the 18-digit SSCC. Starting with the digit next to the check digit and moving left, multiply the digits alternately by 3 and 1, add the results, and subtract the sum from the nearest equal or higher multiple of ten. That difference is the check digit.

GS1's own worked example uses the 17-digit body 37610425002123456. The weighted sum is 101, the next multiple of ten is 110, so the check digit is 9 and the full 18-digit number is 376104250021234569. Paste it above to see it pass.

What this does and does not tell you

A matching check digit means the number is well-formed and unlikely to contain a single typo or a swapped pair of most adjacent digits. It does not prove the GLN, SSCC or GTIN was ever issued by GS1 or belongs to a real location, pallet or product. For plain 12 and 13-digit product barcodes there is also the EAN-13 / UPC-A validator.

Source: GS1 General Specifications, Release 26.0 (ratified January 2026), section 7.9.1, Tables 7-8 and 7-9, gs1.org.

One check digit scheme for every GS1 key

The last digit of every numeric, fixed-length GS1 identification key is a check digit. GS1 Canada says it is required and that it ensures the integrity of the key, calculated by a simple algorithm from the digits before it. The same algorithm covers the Global Trade Item Number (GTIN, in its 8, 12, 13 and 14-digit forms), the Serial Shipping Container Code (SSCC, 18 digits) and the Global Location Number (GLN, 13 digits). This tool validates a complete number or computes the missing digit for any of those lengths, and it also handles the 17-digit GSIN.

It is worth being clear about the three jobs the keys do, because searches for a “GLN lookup” or a “GTIN calculator” often mix them up. A GTIN is the number under a product barcode. A GLN identifies a location or a party such as a warehouse, a store or a company. An SSCC identifies one logistic unit, such as a single pallet or carton, so it can be tracked as it moves. The check digit works the same way on all three.

How to calculate the check digit by hand

  1. Write down the number without its check digit.
  2. Starting at the rightmost digit of that body, multiply the digits alternately by 3 and 1, so the rightmost gets 3, the next to its left gets 1, and so on.
  3. Add the results.
  4. Subtract the sum from the next multiple of ten (or equal, if it is already a multiple). That difference, 0 to 9, is the check digit.

The weights are anchored to the right, so a longer or shorter key does not change the logic. That is also why a GTIN-12 and the same number written as a 14-digit GTIN with two leading zeros have the same check digit: leading zeros add nothing to the total.

Worked examples

What the check digit will and will not catch

Any single mistyped digit changes the weighted sum by a multiple of 1 or 3 times the error, and neither is a multiple of ten for an error of 1 to 9, so the result no longer matches. Most swaps of neighbouring digits are also caught, because the two weights, 3 and 1, differ. There is one blind spot you can derive from the weights: swapping two adjacent digits that differ by exactly 5 changes the sum by 2 times 5, which is 10, so the check digit still matches. For example, 049000050196 and 094000050196 both validate, although two digits have been exchanged.

That last point is the key limit. A matching check digit means the number is well-formed. It does not mean GS1 or any member organisation allocated it. People who search for a GLN generator or a GTIN generator sometimes assume that a number with the right last digit is usable. It is not: real GTINs, GLNs and SSCCs are allocated through GS1 and its member organisations, and a made-up number that happens to validate could collide with one that was issued to someone else.

Related checks

If your number is a plain 12 or 13-digit retail barcode, the EAN and UPC validator is the more direct tool. To read a full scanned string with several fields, use the GS1 Application Identifier lookup and parser. For other schemes with a check digit, see the full list of ID validators, including the ISBN validator.

Frequently asked questions

How do I calculate a GTIN check digit?

Write the number without its last digit, multiply the digits alternately by 3 and 1 starting from the rightmost digit with 3, add the results, and subtract the sum from the next multiple of ten. For 03600029145 the sum is 58, so the check digit is 2.

Is the check digit the same for GTIN, GLN and SSCC?

Yes. GS1 Canada says the last digit of all numeric fixed-length GS1 identification keys is a check digit, and the same weighted 3-and-1 scheme is used for GTIN-8, GTIN-12, GTIN-13, GTIN-14, the 13-digit GLN and the 18-digit SSCC.

What is the difference between a GTIN, a GLN and an SSCC?

A GTIN identifies a trade item, the number under a product barcode. A GLN identifies a location or party, such as a warehouse or company. An SSCC identifies a single logistic unit, such as a pallet or carton.

Can this tool look up a GLN or tell me who owns it?

No. It only checks that the digits are consistent. Allocation and ownership information is held by GS1 and its member organisations, so a lookup has to go through them. This page runs in your browser and makes no request.

Is a generated GLN or GTIN with a valid check digit usable?

No. A valid check digit only shows the number is well-formed. Real keys are allocated through GS1 and its member organisations, so an invented number could clash with one that was issued to someone else.

Why does a GTIN-12 have the same check digit as its 14-digit form?

Padding with leading zeros adds zero to the weighted sum, so the total and the check digit do not change. GS1 Canada's fact sheet shows a GTIN-12 inside AI 01 as (01)00068780000108, with two filler zeros.

What kinds of mistakes does the check digit miss?

Swapping two adjacent digits that differ by exactly 5 leaves the check digit unchanged, because the weights 3 and 1 differ by 2 and 2 times 5 is 10. For example 049000050196 and 094000050196 both validate.

Sources

Primary and reference sources used for this page, each opened and checked in October 2026:

Advertisement