Converter tool

GTIN, UPC and ISBN Check Digit Validator

Check a column of product codes for the right length and check digit as UPC-A, UPC-E, EAN-8, EAN-13, GTIN-14, ISBN-10, ISBN-13 or ISSN, convert UPC-E to UPC-A and ISBN-10 to ISBN-13, and see which GS1 member issued each prefix.

A column of barcodes, one per row

1. Your values

Or paste the table
Or paste a plain list, one value per line

GTIN, UPC and ISBN Check Digit Validator

Operator: Abdulla Al Fahad. How tools are built and checked

A GTIN is the number printed under a barcode, and its last digit exists only to catch typing errors: it is computed from the other digits, so a code with the wrong last digit was mistyped, truncated or damaged by a spreadsheet. This validator decides, for every cell of a column, what kind of code it is from its length and characters, checks the check digit by the rule of that kind, and shows the conversions and the GS1 member that the digits imply.

Key features

  • Check digits for UPC-A, UPC-E, EAN-8, EAN-13, GTIN-14, ISBN-10, ISBN-13 and ISSN, including the ISSN barcode form that starts 977
  • UPC-E to UPC-A expansion and back, and ISBN-10 to ISBN-13 and back (a 979 number has no ISBN-10)
  • GS1 prefix lookup of the issuing member organisation from a bundled table, with in-store, restricted and coupon ranges named
  • A corrected code when only the check digit is wrong, a repeat count, and CSV or XLSX export of every row or only the invalid ones

How length decides the code type, how each check digit is computed and what the GS1 prefix means

Length decides the type. Eight digits is an EAN-8 or a UPC-E (or an ISSN, if it ends in X or passes the ISSN test), ten is an ISBN-10, twelve a UPC-A, thirteen an EAN-13 (an ISBN-13 when it starts 978 or 979 and an ISSN barcode when it starts 977), fourteen a GTIN-14. Spaces and hyphens are ignored, as are a trailing .0 and an ISBN or EAN label in front. An eight digit number can pass as more than one type, so you can force EAN-8, UPC-E or ISSN.

Cells damaged by a spreadsheet are named as such: 4.00638E+12 is scientific notation, whose digits cannot be recovered, and an 11 digit UPC or a 7 digit EAN-8 that validates once padded with zeros is reported with the padded value.

How it works

For UPC, EAN and GTIN the digits left of the check digit are weighted 3, 1, 3, 1 starting with the digit next to it, summed, and the check digit is whatever brings the sum to a multiple of 10. In 4006381333931 the twelve leading digits weigh 89, so the check digit is 1.

ISBN-10 weights its nine digits from 10 down to 2 and works modulo 11, with X standing for ten. An ISSN weights its seven digits from 8 down to 2 the same way.

A UPC-E squeezes a 12 digit UPC-A by dropping four zeros, and the last of its six middle digits says where they go back. 04252614 expands to 042100005264, and that UPC-A compresses back to the same UPC-E.

When to run it

  • A marketplace seller whose upload was rejected for invalid GTINs, checking 8,000 supplier barcodes to find the few hundred with a wrong check digit.
  • A bookseller converting a catalogue of ISBN-10 numbers to ISBN-13 for a distributor that accepts only 13 digits.
  • A buyer who received supplier spreadsheets where Excel stripped leading zeros from UPC-A codes.

Running a check

  1. Drop a table, or paste a plain list of codes.
  2. Choose the code column and, if you have 8 digit codes, which type they are.
  3. Filter to invalid rows or repeats and read the problem and corrected-code columns.
  4. Download every row, just the invalid rows, or the XLSX.

Example

A supplier's 13-line SKU and barcode list, with 8 digit codes decided automatically

sku,barcode
A-100,4006381333931
A-101,036000291452
A-102,4006381333932
A-103,0306406152
A-104,9780306406157
A-105,73513537
A-106,04252614
A-107,0378-5955
A-108,36000291452
A-109,4.00638E+12
A-110,4006381333931
A-111,10614141000415
A-112,9771234567003

Results

10 valid, 3 not valid; A-100 and A-110 carry the same code
Types: EAN-13 3, UPC-A 1, ISBN-10 1, ISBN-13 1, EAN-8 1, UPC-E 1, ISSN 1, GTIN-14 1, ISSN barcode 1, unrecognised 2 (A-108 and A-109)
4006381333932: check digit should be 1, not 2; corrected 4006381333931, issuer Germany
0306406152: valid ISBN-10, ISBN-13 9780306406157
04252614: valid UPC-E, UPC-A 042100005264
36000291452: 11 digits, but padded to 036000291452 it validates
4.00638E+12: Excel scientific notation, digits lost

Tips for best results

  • Sort the invalid export by the problem text. A check digit that should be different points to a typo, a wrong length to a dropped digit, and a padded match to spreadsheet damage.
  • Do not accept a corrected code blindly. A wrong last digit can also mean a wrong digit elsewhere, and the corrected number then belongs to a different product.
  • Format the barcode column as text before opening a CSV in a spreadsheet; scientific notation cannot be undone afterwards.
  • An 11 digit code that validates after a leading zero is almost always a UPC-A that lost its zero.

Limits

A valid check digit says the digits are consistent, not that the code is registered to your product; only GS1's registry can say that.

The GS1 prefix names the member organisation that issued the company prefix. A product with prefix 400 (Germany) can be made and sold anywhere.

ISBN-13 numbers that start 979 have no ISBN-10 form; the converter says so instead of inventing one.

Common errors and how to fix them

11 digits does not match UPC-A (12), EAN-13 (13), GTIN-14 (14), EAN-8 or UPC-E (8), ISBN-10 (10) or ISSN (8).
A digit was dropped or added. When padding with zeros validates, the problem text gives the padded code.
This looks like a number Excel shortened to scientific notation; the lost digits cannot be recovered.
Take the codes from the source system again, as text.

Which prefixes are reserved

GS1 sets aside 020 to 029 and 200 to 299 for in-store and restricted circulation, 040 to 049 for use inside a company, 980 for refund receipts, and 981 to 984 and 990 to 999 for coupons. A code with one of these prefixes can be arithmetically valid and still not be an identifier you can sell a product under.

UPC-E and EAN-8 are different things

Both have eight digits. EAN-8 weights its seven digits like any GTIN. UPC-E is a compressed UPC-A, so its check digit is that of the 12 digit code. 04252614 is a valid UPC-E and fails as an EAN-8, which is why the automatic mode tries EAN-8 first, then UPC-E, then ISSN, and says when more than one passes.

ISBN, ISSN and the 97x prefixes

Books use EAN-13 with prefix 978 or 979, serials use 977 with a two digit price code, and 979-0 marks printed music (ISMN). An ISBN-13 starting 978 becomes an ISBN-10 by dropping the prefix and recomputing the modulo 11 character.

Frequently asked questions

Why does one 8 digit code get two types?

It passed more than one check. Pick EAN-8, UPC-E or ISSN to settle it; most product catalogues mean EAN-8.

Can it draw the barcode?

No, it only validates. The barcode generator here draws Code 128, EAN, UPC and Code 39 symbols and works out the check digit of one code at a time.

Are repeated codes errors?

Not for validity. The times-in-file column shows repeats so you can decide whether they are variants sharing a code or accidental copies.