EAN and UPC are one symbology family, managed by GS1. UPC-A grew up in the US and Canada, EAN-13 in the rest of the world, and today both carry the same kind of number: a GTIN that identifies one product. Scanners at the checkout read them from any direction.
An EAN-13 barcode is built from left to right like this:
-
Quiet zone and guard bars: a blank margin, then a short guard pattern that marks the start.
-
Left half: six digits. The mix of odd and even bar patterns in this half also encodes the 13th digit, the one printed outside the bars on the left.
-
Centre guard: a fixed pattern that splits the code in two.
-
Right half and check digit: six more digits, the last of which is the check digit, then the end guard and quiet zone.
UPC-A has the same layout with 12 digits, so a UPC-A reads as an EAN-13 that starts with 0. EAN-8 is a shorter version with 4 digits on each side. UPC-E drops the centre guard and squeezes zeros out of a UPC number to fit small packs.