What is a GTIN, EAN or UPC validator?
GTIN stands for Global Trade Item Number, the number printed under almost every barcode on a product. It comes in four lengths: GTIN-8 for small packages, GTIN-12 (known as UPC-A in North America), GTIN-13 (EAN-13, the common one in the rest of the world) and GTIN-14 for cartons and cases. The last digit of every one of them is a check digit, calculated from the others, so that a scanner or a form can tell a misread or mistyped code from a good one.
This tool validates any of those codes and explains what it reads. It shows the format, whether the check digit is right and, when it is wrong, which digit would have been right. It also finds the check digit for a number you typed without it, converts between UPC-A, EAN-13 and GTIN-14, expands the compact UPC-E form into a full UPC-A and shows the GS1 prefix, the first three digits that tell which GS1 member organisation issued the company prefix. Codes that start with 978 or 979 are books, so the matching ISBN-10 is shown too; codes that start with 977 are magazines and newspapers, so their ISSN is shown.
Everything runs in your browser and nothing you type is sent anywhere. A few limits matter. A valid check digit proves only that the number is well formed. It does not prove the product exists or who makes it, because that needs GS1's registry. And the prefix tells you where the code was issued, not where the product is made: a French company can print a code issued in France on a product made in Vietnam, and a manufacturer in one country may use a prefix from another.
How to use it
- Open the page. It loads a real EAN-13 (
4006381333931) in the Validate mode, so you see a result at once. - Type or paste a barcode number. Spaces and hyphens are ignored. Other characters are reported by name.
- Read the verdict. It says the format (GTIN-8, UPC-A, EAN-13 or GTIN-14) and whether the check digit matches.
- Read the fields below. The GS1 prefix row shows the country or kind of code, and book or periodical codes add the ISBN or ISSN. Each row has a copy button.
- Choose Check digit when you only have the first digits. Type 7, 11, 12 or 13 digits and the tool gives the last digit and the full code.
- Choose Convert to rewrite a valid code in every format that fits. A UPC-A gains a leading zero to become an EAN-13, an EAN-13 that starts with 0 can drop it, and an 8-digit UPC-E expands to a 12-digit UPC-A.
Examples
A German EAN-13
4006381333931 is valid. The prefix 400 belongs to GS1 Germany, so the tool shows Germany as the country where the code was issued.
A US UPC-A as EAN-13
In Convert mode 036000291452 gives the EAN-13 0036000291452 and the GTIN-14 00036000291452. Adding zeros in front never changes the check digit.
Expanding a UPC-E
04252614 -> 042100005264UPC-E squeezes a UPC-A by removing zeros. The tool reads 04252614 as UPC-E, expands it to the 12-digit UPC-A and shows the other formats. Because 8 digits can also be a GTIN-8, it shows both readings when both are valid.
A book on a barcode
9780306406157 starts with 978. Besides the check, the tool shows the ISBN-13 and the ISBN-10 0306406152. Use the ISBN tool for hyphens and the registration group.
Finding a missing check digit
In Check digit mode, 400638133393 gives 1 and the full code 4006381333931. You get the same logic that a label printer uses.
Common mistakes
- Dropping the leading zero. Spreadsheets turn
0036000291452into a number and remove the zeros. A 12-digit UPC-A with its first zero removed becomes 11 digits and fails. Format the column as text. - Mixing up check digit positions. The check digit is always the last digit. In Check digit mode you type the digits before it.
- Treating the prefix as the factory. The prefix shows the GS1 organisation that issued the company prefix. Products are made all over the world under codes issued at home.
- Reading an 8-digit code only as GTIN-8. An 8-digit number starting with 0 or 1 may be a UPC-E. In Convert mode both readings appear.
- Scanning errors. A scanner may miss a digit on a damaged label. The check digit catches almost all single-digit errors and most swaps, and this page tells you the digit that would be right.
- Expecting a lookup. The tool does not search a product database. It only checks the structure of the number.
Frequently asked questions
How is the check digit calculated?
Take the digits without the last one. From the right, multiply them alternately by 3 and 1, add them up, and the check digit is what you add to reach the next multiple of 10. The rule is the same for all four lengths.
What is the difference between UPC and EAN?
UPC-A has 12 digits and is used in the United States and Canada. EAN-13 has 13 digits. Every UPC-A is an EAN-13 with a leading zero, and the check digit stays the same, which is why scanners read both.
Does a GS1 prefix of 789 mean the product is Brazilian?
It means the code was issued by GS1 Brasil, which gives prefixes 789 and 790. Where the product was made may be somewhere else.
Which codes are not products?
Prefixes 978 and 979 are books, 977 is periodicals, 02 and 20 to 29 are for restricted use inside a store or company, and 99 and 05 are coupons. The tool says so when it sees them.
Can I generate a barcode picture from the number?
Yes. Use the barcode generator to draw EAN or UPC codes. For other check-digit schemes such as payment cards, see the Luhn validator.
Is the table of prefixes complete?
It covers the allocations that GS1 has published for a long time. A prefix not in the table is shown as not in the table instead of guessed.