Utility

UPC & EAN Check Digit Calculator

Calculate or verify the check digit for UPC-A, UPC-E, EAN-13, EAN-8, ITF-14 and GTIN-14 barcode numbers, and convert between the GTIN formats.

Last reviewed by the Radiatus Cloud team

Result appears here.

Need this done properly for your business?

Radiatus delivers secure cloud, DevOps & compliance engineering.

Book a free consult

Every retail barcode ends in a check digit

UPC and EAN numbers are GTINs, Global Trade Item Numbers, and every one of them carries a final digit computed from the digits before it. Scanners use it to reject a misread, and the systems behind them use it to reject a mistyped entry. A GTIN with the wrong check digit will be rejected by GS1, by Amazon, by every major retailer's item setup process and by most ecommerce platforms, usually with an error message that says only that the code is invalid.

The weighting rule

Counting from the right, excluding the check digit, digits alternate between a weight of three and a weight of one. The weighted digits are summed and the check digit is whatever value brings the total up to the next multiple of ten. The alternation always starts from the right, which is why the same rule works unchanged for an eight digit EAN, a twelve digit UPC and a fourteen digit ITF, and why padding a shorter code with leading zeros never changes its check digit.

Formats are the same number

A UPC-A is an EAN-13 with a leading zero, and a GTIN-14 is either with more leading zeros. That is why the same product can appear under several codes that all describe the same item, and why a system storing GTINs should normalise to fourteen digits. The calculator shows every equivalent form so you can see that the codes match rather than assuming they do not.

Related tools

  • User Agent Parser — Parse a User-Agent string into browser, engine, operating system and device. Explains why UA strings are unreliable and what to use instead.
  • QR Code Generator — Generate QR codes for URLs, text, Wi-Fi and contact details. Adjustable error correction and size, produced entirely in your browser.
  • Credit Card Validator — Validate a card number with the Luhn algorithm and identify the issuing network from its prefix. Runs locally, nothing is transmitted.
  • Text Case Converter — Convert text between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case and sentence case. Runs entirely in your browser.

Frequently Asked Questions

Why do UPC and EAN produce the same check digit?

Because a UPC-A is literally an EAN-13 with a leading zero, and leading zeros do not change the weighted sum. Any GTIN can be padded to fourteen digits without affecting the check digit.

What is the difference between GTIN-12, 13 and 14?

They are the same identifier at different lengths: GTIN-12 is UPC-A, GTIN-13 is EAN-13, and GTIN-14 adds an indicator digit for a case or pallet quantity of the same item. Storing all of them as GTIN-14 avoids matching failures.

Why was my product code rejected by a marketplace?

The most common reasons are a wrong check digit, a code that is not licensed to your company prefix, or a recycled code previously used for a different product. This tool answers the first of those, which is the one you can fix yourself.

Can I invent my own barcode numbers?

Not for retail. GTINs are allocated from a company prefix licensed through GS1, and using a number outside your prefix collides with someone else’s product. For internal use only, the codes reserved for restricted circulation exist for exactly that.

Does UPC-E use the same check digit?

UPC-E is a compressed form of a UPC-A that suppresses zeros. Its check digit is the one from the expanded UPC-A, not computed on the six digit form, which is why expanding first is the only reliable way to verify one.

Privacy & Security

Everything runs in your browser; nothing is uploaded.

Data: None
Client-side-Side
Active
v1.0

How to Use

Paste a barcode number to verify its check digit, or a number without it to compute one.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.