GTIN, UPC & EAN Check Digit Calculator
Validate or generate GTIN-8, UPC-A, EAN-13 and GTIN-14 barcodes in bulk.
The first column of each row is read. Spaces and dashes are ignored.
Result
Paste codes and press Check codes. Nothing is uploaded.
Runs in your browserNo uploadLast verified Source: GS1 General Specifications
How it works
Paste one code or thousands, one per line, or open a CSV whose first column holds the codes. Spaces and dashes are ignored. Everything is calculated in your browser.
The length tells the format: 8 digits is a GTIN-8 (EAN-8), 12 a GTIN-12 (UPC-A), 13 a GTIN-13 (EAN-13) and 14 a GTIN-14 for cases and cartons. Any other length is reported, and when 11 digits pass the check, the tool shows the UPC with its missing leading zero, a common side effect of opening barcodes in Excel.
The check digit is the last digit of every GTIN. It follows the algorithm in section 7.9.1 of the GS1 General Specifications: starting from the digit just before it and moving left, multiply the digits by 3, 1, 3, 1 and so on, add the results, and subtract the total from the next multiple of ten. When the last digit doesn’t match, the table shows the digit it should be and the corrected code.
The prefix is checked against GS1’s prefix tables. Restricted circulation numbers (prefixes 02, 04 and 20–29), the demonstration prefix 952, ISBN, ISSN, coupon and reserved prefixes are all named, because none of them identify a product you can list in a marketplace. A GTIN-14 also shows what its indicator digit means and which GTIN-13 it packs.
To create codes, switch to Generate codes, enter your GS1 Company Prefix and the first item reference, and choose how many you need. Each code gets its check digit, and the list downloads as CSV.
Example
Checking the EAN-13 4006381333931. The first 12 digits are multiplied by 1 and 3 in turn, so that the digit next to the check digit is multiplied by 3:
| Digit | 4 | 0 | 0 | 6 | 3 | 8 | 1 | 3 | 3 | 3 | 9 | 3 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| × weight | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 |
| = result | 4 | 0 | 0 | 18 | 3 | 24 | 1 | 9 | 3 | 9 | 9 | 9 |
The results add up to 89. The next multiple of ten is 90, and 90 − 89 = 1, which matches the last digit, so the code is valid. If the code had been typed as 4006381333932, the tool would report “2 → should be 1” and offer 4006381333931.
Generating three EAN-13 codes from the GS1 Company Prefix 0614141, starting at item reference 00001, gives 0614141000012, 0614141000029 and 0614141000036.
FAQ
What’s the difference between GTIN, UPC and EAN?
GTIN is GS1’s name for the whole family of product numbers. A UPC-A is a 12-digit GTIN, used mostly in the US and Canada. An EAN-13 is a 13-digit GTIN used elsewhere. GTIN-8 is for small packs, and GTIN-14 identifies cases and cartons. All four use the same check-digit calculation.
Does a valid check digit mean the barcode is real?
No. The check digit only shows the number was typed or scanned correctly. Whether the code belongs to your product depends on who licensed the GS1 Company Prefix at its start. Marketplaces and Google Merchant Center can check that against GS1 records, so only use codes issued to your brand or to the manufacturer.
Why does a code show up with 11 digits?
Spreadsheets treat barcodes as numbers and drop leading zeros, so the UPC 012345678905 becomes 12345678905. If the 11 remaining digits pass the check, the tool shows the full 12-digit code. To stop it happening, format the column as Text before pasting, or open the CSV in Google Sheets.
What does “restricted circulation” mean?
GS1 reserves prefixes 02, 04 and 20 to 29 for numbers used inside one company or region, such as in-store codes for weighed produce or loyalty items. They aren’t globally unique, so they shouldn’t be used as the GTIN of a product you sell online. Prefix 952 is reserved for examples.
How do I generate my own GTINs?
You need a GS1 Company Prefix, which you get by joining the GS1 organisation in your country. Enter it with the first item reference and how many codes you need, and the tool adds the check digit to each one. For UPC-A codes it removes the prefix’s leading zero, as GS1 specifies.
What is the indicator digit on a GTIN-14?
The first digit of a GTIN-14 says which packaging level it identifies. Values 1 to 8 are cases, cartons or pallets that contain the same item, so the remaining digits match that item’s GTIN-13 apart from the check digit. Indicator 9 means a variable-measure item, such as goods sold by weight.