UPC/EAN Check Digit Calculator
Validate a list of UPC, EAN or GTIN codes at once, and get the corrected check digit for any that fail.
- Codes checked
- 4
- Valid
- 3
- Invalid check digit
- 1
- Wrong length
- 0
- 036000291452UPC-A (GTIN-12)
- 036000291450Check digit should be 2, not 0. Corrected: 036000291452.
- 4006381333931EAN-13 (GTIN-13)
- 123456789012UPC-A (GTIN-12)
Corrected list
036000291452 036000291452 4006381333931 123456789012
Invalid check digits replaced with the correct one. Wrong-length codes are left as you entered them.
How the check digit is worked out
GTIN-8, UPC-A (GTIN-12), EAN-13 (GTIN-13) and GTIN-14 all use the same rule: take every digit except the last, weight them alternately by 3 and 1 starting from the right, and the check digit is whatever makes the total a multiple of 10.
Example: 036000291452
- Data digits
- 03600029145
- Weighted sum
- 58
10 − (58 mod 10) = 2, matching the last digit of 036000291452, so this code passes.
Paste one code per line. The tool strips anything that isn't a digit first, so codes with dashes or spaces still work.
Where this catches mistakes
- A supplier spreadsheet with typos. One flipped digit in a thousand-row barcode column is easy to miss by eye and easy to catch here.
- Before a CSV import. Shopify and most marketplaces reject or silently ignore a barcode with a bad check digit; checking first saves a failed listing.
- Merging catalogs. When two supplier lists use slightly different code lengths (12 vs 13 digits for the same product), the tool tells you which family each one belongs to.
Questions people ask
What lengths of code does this check?
8, 12, 13 and 14 digits: GTIN-8 (EAN-8), UPC-A, EAN-13 and GTIN-14 (used on cases and cartons). Anything else is flagged as the wrong length rather than guessed at.
My code fails. Does that mean the product doesn't exist?
No, it means the digits you have don't satisfy the check digit formula, usually from a typo or a copy-paste error. The corrected list shows what the code should be if only the last digit is wrong.
Can I check hundreds of codes at once?
Yes. Paste as many lines as you have; there's no fixed limit, though very long pastes may feel slower in the browser.
Is a GTIN the same thing as a barcode?
A GTIN (Global Trade Item Number) is the number. A barcode is the printed pattern that encodes it. This tool checks the number; the barcode generator draws the pattern.
Related tools
Last reviewed 30 September 2026.
Sources: GS1: Check digit calculator
