Check a whole list of EAN, UPC and GTIN codes at once
Paste a column of codes or pick a product export file — from WooCommerce or any other platform. The tool checks the check digit, the length, duplicates, invisible characters and placeholders like “n/a” where a code should be.
Updated:
Enter a code without its last digit (7, 11, 12 or 13 digits), or a full code to check it.
In your store, without an export
This list is one file at one moment, and codes change with every import and every new product. Merchlint checks them inside the store, together with the rest of the catalogue.
WooCommerce store
The free Merchlint plugin finds products without a code and two products sharing one — two of its 19 free checks. It only reads and never changes anything in your store.
Install from WordPress.orgShoper store
Merchlint is also an app in the Shoper App Store, for stores on the Polish Shoper platform. The page about it is in Polish.
Merchlint for ShoperHow do you calculate a GTIN check digit?
The check digit is the last digit of the code, and it follows from the others. Start from the right, with the digit just before the check digit, and multiply the digits by 3 and 1 in turn. Add up the results. The check digit is what the sum needs to reach the next multiple of ten; if the sum already is a multiple of ten, the check digit is 0. It works the same way for EAN-13, EAN-8, UPC-A and GTIN-14.
Example: EAN-13
In an EAN-13 this comes out the same as counting from the left: multiply the digits in odd positions (first, third and so on) by 1 and the digits in even positions by 3. For 590123412345:
digits 5 9 0 1 2 3 4 1 2 3 4 5
weights 1 3 1 3 1 3 1 3 1 3 1 3
products 5 27 0 3 2 9 4 3 2 9 4 15
The sum is 83. It is 7 short of 90, so the full code is 5901234123457.
EAN-8, UPC-A and GTIN-14
| Code | Digits before the check digit | Sum of products | Check digit | Full code |
|---|---|---|---|---|
| EAN-8 (GTIN-8) | 9638507 | 86 | 4 | 96385074 |
| UPC-A (GTIN-12) | 01234567890 | 85 | 5 | 012345678905 |
| GTIN-14 | 1590123412345 | 86 | 4 | 15901234123454 |
The GTIN-14 in the table is the EAN-13 from the example with a 1 in front. Weights are counted from the right, so the twelve EAN-13 digits keep their weights and the 1 gets weight 3: the sum goes from 83 to 86 and the check digit changes from 7 to 4.
The check digit calculator above does this for you: type a code without its last digit, or a full code to check it.
What does the validator check?
The whole list in one go, the way it comes out of a store export or a supplier file. For every problem it gives the row number — the same one your spreadsheet shows — and when the file has product names or SKUs, it shows them next to the code. It reads CSV, TXT and XLSX files, finds the code column by its header, and in a WooCommerce export it skips variable products, because their variations carry the codes.
| Check | What counts as a problem | Example |
|---|---|---|
| Check digit | the last digit does not match the calculation from the others | 5901234123450 |
| Length | anything other than 8, 12, 13 or 14 digits | 590123412 |
| Duplicates | the same code in several rows, including when it is written differently | 5901234123457 and 05901234123457 |
| Invisible characters | non-breaking space, tab, zero-width character, trailing space | 5901234123457⟨U+00A0⟩ |
| Placeholder instead of a code | “n/a”, “none”, “-”, all zeros, a spreadsheet formula error | n/a, #N/A |
| Spreadsheet damage | scientific notation, dropped leading zeros, a trailing .0 | 5.90123E+12 |
| Letters | a different number in the code column, or the letter O instead of a zero | 59O1234123457 |
| Ranges Google does not accept | internal codes (2, 02, 04) and coupons (05, 98, 99) | 2001234567893 |
| ISBN-10 | Google wants the ISBN-13 — the tool gives it to you | 0306406152 |
A code is “to fix” when, as it stands, it breaks your data: a store, a feed or a comparison site will reject it or take it for another product. “To review” means the number is well formed but needs a decision — it has spaces inside, it is an ISBN-10, or it sits in a range Google does not accept.
Where do bad codes come from?
- Spreadsheets. Excel takes a code for a number. It shows a 13-digit code as 5.90123E+12 and saves it to CSV that way, so the last digits are lost. Leading zeros disappear because they mean nothing in a number — which hits UPC codes stored as 13 digits with a 0 in front. We tried it in Excel: a sheet with codes typed in as numbers, saved as CSV, had scientific notation in every 13-digit code, and two different codes looked the same.
- Copying from a web page or a PDF. A non-breaking space or a zero-width character comes along with the code. It looks right and matches nothing.
- A field that cannot be left empty. An import or a supplier template demands a value, so someone types “n/a”, “-” or zeros.
- Copied rows. A new product in an import file starts as a copy of an old row, code included. WooCommerce’s Duplicate clears the code on the copy; a spreadsheet does not.
What do WooCommerce and Google do with codes?
Since version 9.2 WooCommerce has its own field, “GTIN, UPC, EAN, or ISBN”. On save it strips everything except digits, hyphens and the letter X, and it refuses a code another product already has. It does not check the check digit. Plugins and imports that write straight to the database skip both checks — that is how a space or a duplicate ends up in the store anyway. Checked in the WooCommerce 11.0.1 source.
Google Merchant Center ignores spaces and hyphens in a code, but it does not accept a wrong check digit, a code from the internal ranges (2, 02, 04) or the coupon ranges (05, 98, 99), and it wants an ISBN-13 instead of an ISBN-10 (Google’s help page).
What can’t this tool check?
Whether the number belongs to this product. The right length and check digit only mean the code is well formed. Whether the manufacturer registered it, and whether it describes this exact product, is in the GS1 registry of the company that issued it.
Does the file leave my browser?
No. The tool is a script on this page. Your browser reads the file and does all the work: nothing is sent to our server or anywhere else, and nothing is stored. The result file is created in the browser too. You can test it — open the page, disconnect from the internet, and check a file.
Questions
Does a correct check digit mean the code is real?
No. A check digit catches a mistake in a single digit and most swaps of two neighbouring digits. It does not catch a made-up number: a code with a correctly calculated last digit passes every calculator, even if it belongs to no product at all.
What is the difference between EAN, UPC and GTIN?
GTIN is the common name for GS1 product numbers; EAN and UPC are names of its formats: EAN-13 is GTIN-13, EAN-8 is GTIN-8 and UPC-A is GTIN-12. GTIN-14 is used on outer packaging, such as a carton holding several units of a product. All of them calculate the check digit the same way.
Is a UPC with a zero in front the same number?
Yes. 012345678905 (UPC-A, 12 digits) and 0012345678905 (13 digits) are the same GTIN — the
leading zero does not even change the check digit, because zero times any weight is still zero. The
tool compares codes in their 14-digit form, so two such entries in one file show up as a duplicate.
Does the prefix tell you where a product was made?
No. The first digits show which national GS1 organisation issued the number — 590, for example, is GS1 Poland. The company that got the number can make the product anywhere.
How do I check codes inside my store?
Merchlint checks codes inside a WooCommerce store, with no export: products with no GTIN, two products sharing one and invisible characters in a code. Each of those pages also shows how to find such products yourself. There is also a separate free plugin just for codes: duplicate SKUs and GTINs, and products without a GTIN.