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.

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.

Advertisement
Advertisement
Listening…