Products Services BlogAbout Contact
Free Tools
QR Code Generator URL Shortener View all free tools Book a demo
Home  /  Blog  /  Barcode Types Guide
Tool guideUpdated Sep 7, 2026 · 6 min read

Barcode Types Explained: CODE128 vs EAN-13 vs UPC-A

Not every barcode is the same, and picking the wrong one can mean a retail scanner rejects your product, or you register a number you never needed. Here's how to choose the right format for retail, shipping, or internal inventory.

On this page
  1. Why the barcode format actually matters
  2. EAN-13 and UPC-A: for retail shelf products
  3. CODE128: for shipping, logistics, and internal tracking
  4. CODE39: the older alternative
  5. Generating barcodes for internal use, for free

Why the barcode format actually matters

Barcodes look interchangeable at a glance, a set of black lines or a grid of digits. But the format underneath determines whether a scanner can actually read it, and whether you needed a registered number in the first place.

Use the wrong format on a retail product and a store's point-of-sale scanner may simply refuse to ring it up. Use the wrong format internally and your own warehouse system might misread codes, or you might spend time and money registering a product number you never actually needed for internal tracking.

The good news is that once you know what each format is actually for, choosing the right one takes about thirty seconds.

There are really only two questions worth asking before you generate anything. First, is this barcode going on a product that gets scanned at a retail checkout, on a marketplace listing, or anywhere it needs to be recognized as a globally unique product? Second, is it purely for your own internal use, like a shipping label, an asset tag, or a warehouse bin, where nobody outside your operation ever scans it against a public product database?

The answer to those two questions points you straight at one of four formats. Get it right and everything downstream, scanning, inventory syncing, order fulfillment, just works. Get it wrong and you end up either fighting a scanner that won't read your code, or paying for a registered product number you didn't actually need.

FormatBest forCharacter set
EAN-13Retail products sold internationally13 digits, numeric only
UPC-ARetail products sold in the US/Canada12 digits, numeric only
CODE128Shipping labels, internal tracking, logisticsFull ASCII: letters, numbers, symbols
CODE39Legacy industrial or internal systemsUppercase letters, numbers, limited symbols

EAN-13 and UPC-A: for retail shelf products

EAN-13 is the 13-digit barcode standard used on nearly every packaged product sold internationally. It's the code you see on a cereal box, a bottle of shampoo, or a chocolate bar at the supermarket. UPC-A is the 12-digit equivalent used mainly in the US and Canada. The two are functionally similar, and most EAN-13 scanners can read UPC-A codes too.

Here's the part people miss: you can't just make up a number for either format if you're actually selling in stores. A real EAN-13 or UPC-A requires a registered manufacturer prefix issued by GS1, the global organization that coordinates barcode numbering. That prefix guarantees your product's number doesn't collide with someone else's product anywhere else in the world.

  • If you're selling through retail stores, marketplaces, or major e-commerce platforms that require a GS1-registered barcode, you need to register a prefix through GS1 (or a regional GS1 member organization) before your number is legitimate.
  • A barcode image generator can render the barcode once you have a valid number, but it cannot issue you a globally unique registered number. That part is a registration process, not a design step.
  • Skipping registration and inventing a number risks a clash with another registered product, which can cause listing rejections on marketplaces or scanning conflicts at retail.

GS1 issues manufacturer prefixes to companies for an annual or one-time fee depending on the region and how many product numbers you need. Once you have a prefix, you build individual product numbers off it, and each one is guaranteed unique worldwide. That's the whole point of the system: a checkout scanner anywhere on the planet can look up your product and know it's yours, not a coincidence.

This matters more than it might seem. Many large marketplaces and retail buyers will not list a product without a valid, GS1-registered barcode, precisely because they've been burned before by sellers using duplicate or invented numbers. If you're planning to sell physical products at any real scale, registering with GS1 early saves a scramble later.

None of this applies if your barcode never leaves your own building. That's where the next two formats come in.

CODE128: for shipping, logistics, and internal tracking

Most barcodes you'll ever need to generate are not retail product codes at all. CODE128 is a flexible, high-density format that can encode any ASCII character, letters, numbers, and symbols, in a single barcode. It's the practical default for shipping labels, internal asset tags, and inventory codes.

Because CODE128 doesn't represent a globally registered product number, there's no registration step and no GS1 prefix required. You can design your own numbering scheme, like WH-2026-00417 for a warehouse bin or AST-00982 for a company laptop, and encode it directly.

  • Shipping and logistics labels. Courier and freight companies rely heavily on CODE128 for tracking numbers because it packs a lot of information into a compact, high-density barcode.
  • Internal asset tracking. Equipment tags, tool check-out systems, and fixed-asset registers commonly use CODE128 with an internally defined ID scheme.
  • Warehouse and inventory codes. Bin locations, batch numbers, and internal SKUs that never touch a retail shelf are a natural fit.

If you're not selling a product on a store shelf and don't need a globally unique registered number, CODE128 is almost always the right choice.

CODE128's density is a big part of why it's the industry default for logistics. It can pack the same amount of information into a noticeably shorter barcode than an older format like CODE39, which matters when you're printing thousands of labels and want them to stay legible on a small shipping sticker. It also supports a checksum digit, which helps a scanner catch a misread before it causes a downstream error, like the wrong item getting picked in a warehouse.

None of this requires special hardware. Any modern barcode scanner, including the barcode-scanning feature built into most phone cameras, reads CODE128 without configuration. That's part of why it has become the default rather than a niche choice.

CODE39: the older alternative

CODE39 is an older alphanumeric barcode format that's still found in some industrial and internal systems, particularly older inventory software, some government and defense applications, and legacy manufacturing lines. It can encode letters, numbers, and a limited set of symbols.

The main drawback is space efficiency. CODE39 needs more width to encode the same amount of data compared to CODE128, since its encoding scheme is simpler and less compact. For a modern label or tag with limited space, that difference adds up quickly.

Generally, CODE39 is only worth using if an existing system you already rely on specifically requires it. For anything new, CODE128 covers the same use cases more efficiently.

You'll still run into CODE39 in some libraries, some older healthcare and pharmaceutical tracking systems, and a fair number of factory floors where the barcode readers and label printers were installed years ago and never upgraded. If your organization already has that infrastructure in place, generating new CODE39 labels to match is the sensible move, since replacing working hardware just to switch barcode formats rarely pays for itself.

If you're starting a numbering system from scratch with no legacy constraint, there's little reason to pick CODE39 over CODE128 today. You get the same alphanumeric flexibility from CODE128 with a smaller footprint per label.

Generating barcodes for internal use, for free

Once you know which format fits your situation, actually producing the barcode image is the easy part. Our own free Barcode Generator creates CODE128, EAN-13, UPC-A, and CODE39 barcodes as downloadable images, with no sign-up and no limit on how many you generate.

One important distinction worth repeating: for genuine retail EAN-13 or UPC-A numbers, you still need a registered GS1 prefix before the number is valid for retail distribution. The tool renders the barcode image itself from whatever number you provide; it isn't a registration service and can't issue you a globally unique product number. For internal tracking, shipping labels, and asset tags using CODE128 or CODE39, there's no registration step at all, so you can generate and use those immediately.

In practice, most people reaching for a barcode generator are handling the second case: labeling boxes for shipment, tagging office equipment, or setting up a simple warehouse numbering system. For that work, pick CODE128, decide on your own ID format, generate the images, and print. There's no account to create and nothing to wait on.

If you do need a real retail barcode, generate the image the same way once you have your GS1-issued number, and treat the registration step as something you do once, ahead of time, rather than something the barcode tool needs to handle for you.

Generate a barcode now

Free, unlimited, and no sign-up required.

Open the Barcode Generator →

FAQ

Can I make up my own EAN-13 number for a product I sell online?
Technically you can generate a barcode image with any 13 digits you like. But for real retail distribution, you should get a registered GS1 prefix instead, so your number doesn't clash with another product that's already using it somewhere else in the world.
What's the difference between a barcode and a QR code?
A traditional barcode like EAN-13 or CODE128 is a one-dimensional pattern of lines that stores a limited amount of data, usually a number or short code. A QR code is two-dimensional, can hold far more data including full URLs, and is read by cameras rather than dedicated laser scanners.
Do I need special software to scan these barcodes?
For CODE128, EAN-13, UPC-A, and CODE39, any standard barcode scanner or a barcode-scanning phone app can read them, since these formats have been standard for decades. You don't need proprietary software tied to any single vendor.
Which format should I use for internal warehouse tracking?
CODE128 is the practical default. It doesn't require any registration, it can encode letters and numbers so you can build your own asset or bin numbering scheme, and it's more space-efficient than CODE39.
Written by the Go4Lead.tech team — we build the tools we write about.

Need software built around your workflow?

This guide is a small taste of what we do. Go4Lead.tech builds custom software, web and mobile apps, and AI automation for businesses.