Canadian · Validation

EAN-13 / UPC-A check digit validator.

Validate a complete 12-digit UPC-A or 13-digit EAN-13 barcode's real check digit, or enter the code without its check digit to have the correct one computed for you. Everything runs in your browser: nothing you type is transmitted anywhere.

Source: GS1 weighted mod-10 check digit calculation Distinct from this site's barcode generator tools — this one validates existing codes

Advertisement

Inputs

What are you entering?
Enter the complete 12 or 13-digit code, including its check digit.

Result

Enter a code and press Check.

Advertisement

How the EAN-13 / UPC-A check digit works

EAN-13 (13 digits) and UPC-A (12 digits) are both GS1 barcode formats, and UPC-A is arithmetically just a 13-digit code with an implicit leading zero — so both share one checksum. Starting from the rightmost data digit (the one immediately left of the check digit) and moving left, digits are alternately weighted 3 and 1; every weighted digit is summed, and the check digit is whatever value makes the total a multiple of 10.

A real EAN-13 barcode, 4006381333931, sums its 12 data digits (weighted) to 89, so (10 − 9) mod 10 = 1 matches its real trailing check digit. A real UPC-A, 036000291452 (Kellogg's Corn Flakes), sums its 11 data digits to 58, giving a check digit of 2.

Not the same as this site's barcode generators

The Barcode Generator and UPC-A Generator create a new scannable barcode image from digits you choose, auto-filling the check digit as they go. This tool does the opposite: it takes a code you already have — from a product, a spreadsheet, an import file — and tells you whether its existing check digit is correct, or works out what the check digit should be for a code that's missing one.

What the numbers under a barcode are

The GS1 General Specifications define the retail numbers as GTINs: a GTIN-12 (the U.P.C. number, 12 digits) and a GTIN-13 (the EAN-13 number, 13 digits) are each described as a company prefix, an item reference and a final check digit. The EAN-13 and UPC-A symbols simply print those digits as bars. In the Specifications, a GTIN shorter than 14 digits can be padded with leading zeros without changing its value, which is why a UPC-A number behaves exactly like an EAN-13 number with a 0 in front, and why one checksum serves both.

The calculation, using GS1's own example

GS1 publishes the manual method in three steps: multiply each digit by 3 or 1 in alternating positions, add the results, then subtract the sum from the nearest equal or higher multiple of ten. For a 13-digit EAN the twelve data digits are weighted 1, 3, 1, 3 and so on from the left; the digit next to the check digit always gets 3. GS1's worked example uses the data digits 629104150021:

GS1 example: data digits 629104150021 give check digit 3
Digit629104150021
Weight131313131313
Product66930121150023

The products total 57; the next multiple of ten is 60; 60 − 57 = 3. The complete EAN-13 is 6291041500213. Enter that in the validator and it passes; change the last digit and it reports the digit it expected. Two more checks you can run: the EAN-13 4006381333931 has a weighted sum of 89 and a check digit of 1, and the UPC-A 036000291452 has a weighted sum of 58 over its 11 data digits and a check digit of 2.

Validating versus calculating

The two modes answer different needs. Use validate when you have a complete 12- or 13-digit code from a product, a supplier spreadsheet or an import file and want to know whether it was copied correctly. Use compute when you have only the data digits, such as a code under construction or a column where the last digit was dropped, and need the missing digit. If you enter 12 digits in compute mode the tool treats them as EAN-13 data digits; with 11 digits it treats them as UPC-A data digits.

Common mistakes with barcode numbers

Getting a UPC or EAN code in Canada

People searching for "UPC code Canada" are usually asking where the numbers come from. GS1 is the organization that assigns company prefixes, and GS1 Canada runs the Canadian member organization with a Get a Barcode section on its site. A check-digit validator cannot tell you whose prefix a number carries, because the arithmetic is the same for every prefix. If you sell on a marketplace, read its barcode policy as well; this site's Amazon GTIN exemption guide covers one case.

Related tools

To make a scannable image from a code that already validates, use the EAN-13 generator or UPC-A generator. To convert between the two formats see the EAN-13 to UPC-A converter, and for case codes and pallet labels the GLN, SSCC and GTIN validator.

Frequently asked questions

How do I calculate a UPC check digit?

Weight the 11 data digits 3, 1, 3, 1 and so on, starting with 3 on the digit nearest the check position, add the products, and subtract the sum from the next multiple of ten (a sum that is already a multiple of ten gives 0). For 03600029145 the sum is 58, so the check digit is 2 and the UPC-A is 036000291452.

Is the EAN-13 check digit calculated the same way as UPC-A?

Yes. A UPC-A number is a 12-digit GTIN that behaves like an EAN-13 with a leading zero, and the GS1 Specifications say leading zeros do not change the value. The digits are weighted 3 and 1 alternately and the check digit brings the total to a multiple of ten.

Why does my barcode fail validation when it looks right?

Common causes are a dropped leading zero, a transposed pair of digits, a space or letter pasted in, or entering a code without its check digit in validate mode. Fix the digits, or switch to compute mode if the final digit is missing.

Does a valid check digit mean the barcode is registered to the product?

No. The check digit only shows the digits are internally consistent. Whether a company prefix belongs to a particular business is recorded by GS1, and the arithmetic is the same for every prefix.

Where do I get a UPC code in Canada?

Company prefixes are issued through GS1, and GS1 Canada operates the Canadian member organization. Its website has a Get a Barcode section.

Can I validate a 14-digit GTIN or an ISBN here?

This page handles 12- and 13-digit codes. The same weighted-sum rule is described by GS1 for other GTIN lengths, but for case codes and SSCCs use the GLN, SSCC and GTIN validator, and for books use the ISBN validator.

Does this tool send my barcode numbers anywhere?

No. The calculation runs in your browser, so product codes from an unreleased item or a client catalogue stay on your device.

Sources

Retrieved 2026-10-19. Each link was opened and read for the claim it supports.

Advertisement