Guide · Jul 10, 2026

UPC vs EAN vs Code128: Which Barcode Format Do You Actually Need?

Dozens of barcode formats exist for specialized industries, but the overwhelming majority of everyday needs — retail products, internal inventory, asset tags, shipping labels — are covered by three: UPC-A, EAN-13, and Code128. They're not interchangeable, and picking the wrong one is a common source of "why won't this scan at checkout" problems.

UPC-A: the 12-digit US retail standard

UPC-A is a fixed 12-digit format, and it's what you'll find on the overwhelming majority of retail products sold in the US and Canada. The first several digits identify the manufacturer (assigned by GS1, the organization that administers barcode number ranges), the next few identify the specific product, and the final digit is a checksum calculated from the others — it exists specifically to catch a mistyped or misread digit, not to encode any additional information.

EAN-13: the international equivalent

EAN-13 is UPC-A's international counterpart — 13 digits instead of 12, used across most of the world outside North America. The extra digit at the front is typically a country or region prefix. In practice, a UPC-A code can be represented as EAN-13 by adding a leading zero, which is why most point-of-sale systems and barcode scanners handle both formats interchangeably without any special configuration.

The part that actually matters: these numbers have to be registered

This is the detail that trips people up most: generating a syntactically valid UPC-A or EAN-13 barcode is trivial — any barcode generator can produce one from 12 or 13 digits. But the number itself is supposed to be assigned to you specifically through GS1, so that it doesn't collide with another company's product using the same digits. If you're planning to sell a physical product through a retailer or major marketplace, you generally need a real, registered GS1 prefix — a barcode generator handles turning that number into a scannable image, but it doesn't grant or verify ownership of the underlying number.

Code128: for everything that isn't a retail product number

Code128 works completely differently — instead of a fixed digit count tied to a registration scheme, it can encode any alphanumeric string of essentially any reasonable length. There's no GS1 registration involved, no fixed format, and no assumption that the code represents a retail product at all. This makes it the right default for internal use: warehouse bin locations, asset tags, employee badges, internal SKUs, ticket numbers — anything you're generating and consuming entirely within your own systems, where there's no external registry to coordinate with.

A quick way to decide

If the code is a real retail product number assigned through GS1, use UPC-A (US/Canada) or EAN-13 (elsewhere) to match the number's actual format. If you're numbering something internal — inventory, assets, tickets — and there's no registration authority involved, Code128 is almost always the simpler, more flexible choice, since it isn't constrained to digits-only or a fixed length.

Generate them

FreeToolDev's bulk barcode generator supports all three formats from a pasted list of codes — UPC-A and EAN-13 codes are validated against their checksum before rendering, so a mistyped digit gets flagged rather than silently producing a barcode that fails to scan.