How do GTIN, EAN and UPC numbers relate and how to tell them apart?
26 Apr 2023
GTIN, EAN and UPC numbers are all meant to uniquely identify products. The idea is that no matter where a product is used, sold or otherwise handled, it should always have the same number so it can be easily identified. To make identification easy, there is a machine readable barcode associated with each number so a barcode scanner can easily read the number.
UPCs (Universal Product Codes) were the first, starting in the USA, but spreading all over the world. Later came the EAN codes (European Article Numbers), but despite the name they are also a global identification system. And as it became clear that the EAN space was still not large enough to hold all products of the world, the system was expanded to the GTINs (Global Trade Item Numbers).
What kind of code you have in front of you can easily be seen by its length:
UPCs are always 12 digits long. EAN codes are 13 digits long and GTINs are 14 digits long. UPCs are a subset of the EAN system – when you add a zero in front, they become valid EAN numbers. Same with EAN numbers, they become valid GTINs when you add a 0 in front. So they are really all part of one system and can be easily transformed into one another. But as you can see, even though they are all just numbers, the leading zeros matter, so you can easily tell them apart from other numbers.
How do ISBN numbers fit in ?
ISBN numbers also fit into the system, but are not quite so easy to convert. The "old" ISBN numbers have 10 digits (possibly including an X in the last place). You can convert the 10-digits ISBNs (aka ISBN-10) to 13-digit ISBNs (aka ISBN-13) by placing 978 in front, but you have to re-calculate the last digit, the check-digit. 13-digit ISBNs are valid EANs and can be treated just like EANs and by adding another 0 in front, you can convert them to GTINs.When you use our API to look up barcodes, you need to pass ISBN-10 numbers through the special isbn= parameter for lookup, since they have a different checksum. If you have ISBN-13 numbers, you can look them up through the ean= parameter.
But what about 8-digit EAN numbers ?
There are also EAN codes that are only 8 digits long. But they are only meant to be used internally in a store and each store can assign them differently, so when you see them, you can't be sure for which product they stand, since they probably mean something else in a different store. They do not fit into the global system with all the other codes and can not be converted.Tl;dr
You can easily convert UPC codes into EANs and EANs into GTIN codes, by adding leading zeros. ISBN codes can also be converted, but make sure to update the checksum.
You might also be interested in this:
UPC barcode lookup