Barcode Calculator
Input
Paste complete or incomplete GTINs
Output
How to calculate or validate a check digit
Put each number on its own line or separate them with commas. One paste can hold up to 1 million rows.
Calculate check digits
The calculator completes numbers that are missing their check digit. Paste your GTIN-8, GTIN-12, GTIN-13 or GTIN-14 numbers without the last digit in the left text box and click Calculate. The complete number, with the check digit calculated by the GS1 mod-10 rule, appears in the right text box. A number with the wrong length or a character that is not a digit comes back marked "invalid:" instead.
Validate check digits
The validator checks the length of each number and its last digit, the check digit, to see whether it is a valid GTIN-8, GTIN-12, GTIN-13 or GTIN-14. Paste complete numbers in the left text box and click Validate. A valid number gets its type after it, as in "5901234123457, GTIN-13 OK". A number with a wrong check digit gets "invalid check digit", and one with the wrong length or a non-digit character gets "is invalid". A number of another length, such as an 18-digit SSCC or a 10-character ISBN, is not a GTIN: paste it into the barcode identifier to see what it is.
This calculator works out and validates check digits for GTIN, EAN and UPC numbers. It has been checked with up to 1 million lines per paste; in our test that took about half a minute, and the page does not respond while it works. It does not draw barcodes: to make the barcode image itself, use the barcode generator.
Other barcode tools from the eancheck team
We built or helped build these barcode tools on other sites:
- Barcode validator on Aarrange.com. A barcode validator and check digit calculator that also names the type of each barcode.
- Barcode tools on Lime Convert. We helped build the barcode validator, barcode calculator and barcode generator on the conversion platform Lime Convert.
- GS1 prefix lookup on Smartatest. Resolves the leading digits of a GTIN to the GS1 Member Organisation that issued the number, across all 144 allocated ranges. In Swedish.
What the calculator handles
The calculator takes many numbers of different lengths in one paste. It calculates every check digit and lists the complete numbers in the output box, in the same order you entered them.
It has been checked with up to 1 million lines per paste. Larger pastes may work, but they have not been tested.
Supported barcode standards
The calculator works out and validates check digits in bulk for these EAN, UPC and GTIN formats:
| Standard | Digits | Also Known As | Typical Usage |
|---|---|---|---|
| GTIN-8 | 8 | EAN-8 | Small products with limited packaging space |
| UPC-A | 12 | GTIN-12 | Retail products in North America |
| GTIN-12 | 12 | UPC-A | Universal product identification (12-digit) |
| EAN-13 | 13 | GTIN-13 | Retail products worldwide (most common barcode) |
| GTIN-13 | 13 | EAN-13 | International product identification (13-digit) |
| GTIN-14 | 14 | ITF-14, UCC-14, SCC-14 | Outer cases and shipping containers |
| ITF-14 | 14 | GTIN-14 | Cartons and pallets (Interleaved 2 of 5 symbology) |
| SCC-14 | 14 | GTIN-14, UCC-14 | Shipping containers in supply chain logistics |
How a barcode works
A barcode is a row of bars and spaces that a scanner reads as a number or as text. Shops use EAN and UPC codes to identify products; asset tags and ID labels often use Code 39. A QR code on a pack can carry the same GTIN inside a web address, a GS1 Digital Link.
A barcode symbol typically consists of five parts: a quiet (or empty) zone, a start character, data characters, a stop character and finally another quiet zone.
EAN
EAN stands for European Article Number, now called International Article Number. An EAN-13 has 13 digits and is the retail barcode in most countries outside the USA and Canada. A UPC-A is not a different number system: put a 0 in front of a 12-digit UPC-A and you get a valid EAN-13. The two differ in digit count, in where they are used and in how the digits are printed under the bars. To draw one from your number, use the EAN-13 barcode generator.
UPC
UPC stands for Universal Product Code. A UPC-A is a unique 12-digit number with a barcode above it. The first digits are the company prefix that GS1 licenses to the brand owner, and its length varies: GS1 US issues prefixes of 6 to 11 digits. The digits after it are the item number, and the last digit is the check digit, which lets a scanner catch a misread.
More barcode tools
Print-ready UPC, EAN-13, ITF-14, Code 128 and Data Matrix at the GS1 size, one at a time or a whole list
Turn a GTIN into a Digital Link URL and QR code with batch, expiry and serial qualifiers
Convert a whole product catalogue to Digital Link URLs from a single paste, CSV and QR ZIP exports
Recover smudged or partially unreadable GTINs by marking unknown digits with ? or *
Decode paren, FNC1 or Digital Link input, with a breakdown card for each AI and an anatomy widget
Editable table with bulk operations, sort, filter, and round-trip export to CSV / paren / FNC1 / Digital Link / QR ZIP
Recover data from damaged, blurry, or partially destroyed QR codes with automatic image enhancement
Paste any code and find out what it is: GTIN, ISBN, SSCC, GLN, ITF-14, GS1-128, Digital Link, VIN, IMEI, or ASIN
Convert between ISBN-10 and ISBN-13 with recomputed check digits, hyphenation, and a clear explanation when conversion is not possible
Frequently asked questions
What is a barcode check digit?
A check digit is the last digit of a GTIN barcode number. It is calculated from the digits before it with the GS1 mod-10 algorithm, and it catches a misread or a mistyped digit. When a barcode is scanned, the scanner calculates the check digit again and compares it with the one printed. If they do not match, the scan is rejected.
What is the difference between EAN and UPC?
The digit count and where each is used. A UPC-A (Universal Product Code) has 12 digits and is the retail barcode of the USA and Canada. An EAN-13 (European Article Number, now International Article Number) has 13 digits and is used in most other countries. Put a 0 in front of a UPC-A and you get a valid EAN-13 with the same check digit, because both use the same GS1 mod-10 algorithm.
How is the check digit calculated?
With the GS1 mod-10 algorithm. Start from the rightmost digit, leaving out the check digit position, and multiply the digits by 3 and 1 in turn. Add up the results. The check digit is the number you need to add to reach the next multiple of 10, or 0 if the sum already is one. The calculator above does this for every line you paste.
How many barcodes can I process at once?
Up to 1 million in one paste, the largest batch we have tested; larger pastes are untested. Everything runs in your browser, so the speed depends on your computer: in our test, 1 million rows took about half a minute and the page did not respond meanwhile. Paste numbers one per line or separated by commas, in any mix of GTIN-8, GTIN-12, GTIN-13 and GTIN-14.
Can I paste a full product list into the calculator?
Yes. The calculator runs in your browser, so a full export of product numbers from your shop or ERP stays on your computer: nothing is sent to a server and nothing is stored after you close the page. Paste the GTIN column as it is, check the output for lines marked invalid, and fix those in your source system before you print.
What barcode formats are supported?
The calculator supports GTIN-8 (8-digit), GTIN-12/UPC-A (12-digit), GTIN-13/EAN-13 (13-digit), and GTIN-14/ITF-14/UCC-14/SCC-14 (14-digit) barcode standards. The GTIN-14 is the number of a carton or case, printed as an ITF-14 barcode; UCC-14 and SCC-14 are older names for it. It does not handle ISBN-10, SSCC or other identifiers.
Why does my barcode say invalid check digit?
Because its last digit does not match the one calculated from the others, so a digit is wrong. The usual cause is a number typed by hand: one wrong digit, or two neighbouring digits swapped. Compare the line with the digits printed under the bars. If a digit on the label cannot be read, type ? in its place in the barcode repair tool, which lists every number that fits. Scanners run the same check, so a barcode printed with a wrong check digit fails at the till.
Why does a GTIN column from Excel come back invalid?
Usually because Excel changed the numbers when it opened the file. It drops leading zeros, so the UPC 012345678905 becomes 12345678905, one digit short. It also shows long numbers in scientific notation, such as 5.90123E+12, and saves them that way in a CSV. Format the column as Text before you paste or import, then copy it into the calculator again. A zero that Excel has already removed cannot be recovered from the file; take the number from your source system.
Does the check digit catch every typing mistake?
No, but it catches the common ones. Every single wrong digit is caught, and so are most swaps of two neighbouring digits. A neighbouring swap is missed when the two digits differ by 5, such as 16 typed as 61, because the weights 3 and 1 then change the sum by a multiple of 10. A swap of two digits two places apart is never caught, since both positions carry the same weight. A valid result means the number is consistent, not that it is the right product.