Category: Developer tools

EAN/UPC Check Digit Calculator

System ideaMissing a tool?

Validate EAN-13 and UPC-A barcodes and calculate their check digit

Validate EAN-13 and UPC-A barcode numbers, or calculate the check digit for a code that's missing one. Runs entirely in your browser, without looking up the product.

Check digit1Full code4006381333931

Everything on this page is processed in your browser. Nothing is uploaded.

What this tool does

EAN-13 and UPC-A barcodes both end in a check digit computed from an alternating weighted sum of the preceding digits: 1-3 for EAN-13, 3-1 for UPC-A. Because a UPC-A code is numerically an EAN-13 code with a leading zero, the two schemes are closely related but use different weight patterns when you count from just the UPC-A digits on their own. This tool applies the correct weighting for whichever mode you choose, and works whether you paste the full code or just the digits before the check digit.

How to use it

  1. Choose EAN-13 or UPC-A.
  2. Enter the digits: the full code to validate it, or the code without its final digit to calculate the check digit.
  3. Read the result: valid or invalid, or the calculated check digit and completed code.

Privacy

This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.

Frequently asked questions

What's the difference between EAN-13 and UPC-A?
UPC-A is a 12-digit code used mainly in the United States and Canada; EAN-13 is a 13-digit code used internationally. A UPC-A code is equivalent to an EAN-13 code with a leading zero, but they use different check-digit weighting when computed on their own digit counts.
Does this tool look up what product the barcode belongs to?
No. It only validates or computes the checksum locally; there is no product database lookup.
Can I use this for EAN-8 codes?
This tool is built for the more common EAN-13 and UPC-A lengths. EAN-8 uses the same style of alternating weighted checksum but over a shorter code.