EAN Barcodes, UPC, and Product Barcode Types Explained
Barcodes are everywhere: on product labels, shipping boxes, library books, and boarding passes. But there is no single barcode format. The main barcode types are EAN barcodes and UPC-A for retail products, Code 128 for inventory and logistics, ITF-14 for shipping cartons, and 2D formats such as QR codes and Data Matrix for larger amounts of data. Choosing the wrong type of barcode can stop a product from scanning at checkout or break an inventory workflow. This guide compares the most common types of barcodes, explains what the digits in a product barcode actually mean, and shows you where a real retail barcode number comes from.
Which type of barcode should you use?
Use UPC-A for products sold in the US and Canada, EAN-13 for retail products sold in most other countries, EAN-8 when the package is too small for 13 digits, Code 128 for internal inventory and shipping labels, and ITF-14 for cases or cartons. Use a QR code or Data Matrix when you need to store a URL, text, or more data than a standard linear barcode can hold. EAN and UPC barcodes only work at retail checkout if the number is a GTIN licensed to you, so read the section on where product barcodes come from before you print anything.
The two main types of barcodes: 1D and 2D
All barcodes fall into two main categories: one-dimensional (1D) and two-dimensional (2D).
1D Barcodes (Linear Barcodes)
These are the classic barcodes you see everywhere, a series of vertical black and white lines of varying widths. They encode data horizontally in one direction, which is why they're called "one-dimensional." Common examples include CODE128, EAN-13, UPC-A, and Code39. They can be read by any standard barcode scanner and are simple to print.
The main limitation is data capacity. A 1D barcode typically holds 15-30 characters. That's why a UPC code on a product just contains the product ID. The actual product details live in a separate database.
2D Barcodes (Matrix Barcodes)
These encode data in two dimensions, both horizontally and vertically, creating patterns like QR codes and Data Matrix codes. They can store significantly more information: a typical QR code holds 3,000+ characters compared to a 1D barcode's 30. They're also more resilient to damage and can be read from any angle.
The trade-off? They require a smartphone camera or specialized 2D scanner, whereas 1D barcodes work with basic laser scanners that have been around for decades.
The Most Common 1D Barcode Formats
CODE128: The Workhorse
CODE128 is the most versatile 1D barcode format. It can encode all ASCII characters: letters, numbers, punctuation, everything. It's compact (shorter than other formats for the same data) and incredibly reliable. Most businesses use CODE128 for internal logistics, warehouse management, and any situation where you need to encode custom data like order numbers or serial codes.
Use CODE128 when: You need flexibility to encode any characters, you're managing inventory internally, or you're creating shipment labels.
EAN-13: The Global Retail Product Barcode
EAN-13 is the standard retail product barcode in Europe, Asia, Australia, Latin America, and Africa. EAN originally stood for European Article Number, but the format went worldwide and is now officially the International Article Number, which is why you will see both names used for the same barcode. You will find an EAN barcode on almost every packaged retail product sold outside the United States, and retailers in those regions require one before a product can scan at checkout.
The 13 digits are not arbitrary. Reading left to right, an EAN barcode breaks down into four parts:
- GS1 prefix (first 2 to 3 digits): identifies the GS1 member organization that issued the number. 50 is GS1 UK, 40 to 44 is Germany, 30 to 37 is France, 890 is India, 00 to 13 is the US and Canada. This tells you where the number was licensed, not where the product was manufactured.
- Company prefix: the block of digits GS1 assigned to your business. Everything you sell shares this prefix.
- Item reference: the digits you assign yourself, one unique value per product and package size. A 500ml bottle and a 1 liter bottle of the same drink need different item references.
- Check digit (last digit): a single digit calculated from the other 12 using a weighted sum. Scanners recompute it on every read, so a barcode with the wrong check digit will be rejected even if the bars print perfectly.
Together those 13 digits form a GTIN, the Global Trade Item Number that identifies one product in one package size anywhere in the world. When a retailer asks for your GTIN, your EAN-13 number is the answer.
Use EAN-13 when: You're selling products in Europe, Asia, Australia, or any country outside North America, or when a retailer explicitly requires it.
EAN-8: The Short EAN Barcode for Small Packages
EAN-8 is the compact version of the same standard: a 2 or 3 digit GS1 prefix, a short item reference, and a check digit, for 8 digits total. It exists for one reason, which is that a full EAN-13 barcode needs roughly 1.5 inches of label width including quiet zones, and some packages simply do not have it. Think lipstick tubes, single sticks of gum, cigarette packs, small cosmetics, and sachets.
The tradeoff is capacity. EAN-8 numbers are allocated one at a time rather than as a company prefix block, so you cannot generate your own range, and most GS1 member organizations only issue them when you can show the packaging genuinely has no room for EAN-13. Do not reach for EAN-8 just because it looks tidier.
Use EAN-8 when: Your package is physically too small for an EAN-13 barcode at its minimum printable size, and GS1 has issued you a specific EAN-8 number. Otherwise use EAN-13.
UPC-A: The North American Standard
UPC-A (Universal Product Code) is the barcode standard for retail products in North America. It's 12 digits and mandatory for selling in US and Canadian retail chains like Walmart, Target, and Amazon. Every product sold in these retailers has a UPC-A code. Interestingly, UPC-A is actually a subset of EAN-13, so you can read a UPC code with an EAN-13 scanner.
Use UPC-A when: You're selling physical products in US or Canadian retail stores, or through major online retailers that require barcodes.
Code39: The Legacy Format
Code39 was widely used in manufacturing and logistics before CODE128 became standard. It can encode numbers, uppercase letters, and some special characters. You still see it on military equipment, automotive parts, and in some healthcare settings. If your industry has been using Code39 for decades, you might still need it for compatibility, but it's less dense than CODE128 (requires more space for the same data).
Use Code39 when: Your industry standard or legacy system requires it. For new projects, CODE128 is a better choice.
ITF-14: For Shipping Cartons
ITF-14 (Interleaved 2 of 5) is used specifically for shipping cartons and cases in retail supply chains. Retailers expect this format on case labels because they need to differentiate between individual products (UPC-A) and bulk cases (ITF-14). If you're shipping cases of products to retailers, you need ITF-14 on the outer carton.
Use ITF-14 when: You're shipping cases or cartons of products to retail distributors. This is required for retail fulfillment.
Where Product Barcodes Come From
This is the part most barcode guides skip, and it is the part that actually blocks product launches. A barcode generator draws the bars. It does not give you the right to a number. For retail product barcodes, the number itself has to be licensed.
GS1 is the nonprofit standards body that administers EAN, UPC, and GTIN numbers worldwide through national member organizations such as GS1 US, GS1 UK, and GS1 India. You join the member organization for your country, receive a company prefix, and then assign your own item references underneath it. Pricing depends on your country and how many products you need, and most member organizations charge an initial fee plus an annual renewal. Smaller sellers who need only a handful of numbers can usually buy them individually rather than licensing a full prefix.
You will also find resellers offering cheap lifetime barcodes with no renewal fee. These are usually older numbers subdivided from a company prefix that was licensed to a different business, which means the GS1 prefix in your barcode resolves to someone else's company name. Amazon, Walmart, and a growing number of grocery chains now verify GTINs against the GS1 registry and will reject or suppress listings where the brand on the listing does not match the brand registered to the prefix. If your route to market includes a major retailer or marketplace, license through GS1 directly.
When You Do Not Need a Licensed Barcode at All
Plenty of barcode projects never touch GS1, and paying for a GTIN you do not need is wasted money. You can generate your own numbers freely when the barcode is only ever scanned inside your own operation:
- Internal inventory and asset tags: warehouse bin locations, equipment, tools, IT assets. Use Code 128 with your own ID scheme.
- Your own stores or market stalls: if you control the point of sale system, you control the numbers it recognizes.
- Direct to consumer sales from your own site: no third party is looking up your GTIN, so a Code 128 SKU label is enough.
- Internal shipping and picking labels: order numbers, pick lists, and tote labels that stay inside your fulfillment process.
The line is simple. The moment a barcode has to scan at a checkout you do not own, or appear in a retailer or marketplace catalog, you need a licensed EAN or UPC number. Everything else is yours to invent.
When Each Format Actually Matters
Choosing the wrong barcode format wastes time and money. Here's a quick decision guide:
| Your Situation | Recommended Format | Why |
|---|---|---|
| Selling in US/Canada retail | UPC-A | Required by major retailers |
| Selling in Europe/Asia retail | EAN-13 | Regional retail standard |
| Retail product, package too small for 13 digits | EAN-8 | Same standard in less label width |
| Internal warehouse/inventory | CODE128 | Most flexible and compact |
| Shipping cases to retailers | ITF-14 | Retail supply chain standard |
| Need to store lots of data | QR Code | 2D format, 100x more capacity |
| Legacy manufacturing system | Code39 | Compatibility with old equipment |
Generating Barcodes Without Paying for Software
You don't need expensive software like Adobe Illustrator or barcode libraries to create barcodes. Online barcode generators handle everything:
Online Barcode Generator Workflow
- → Choose your barcode format (CODE128, EAN-13, UPC-A, etc.)
- → Enter the data (product ID, order number, etc.)
- → Customize size, border, and resolution
- → Download as PNG, SVG, or PDF
The barcode is generated using client-side JavaScript, so your data never leaves your browser, and the process takes seconds. You can generate hundreds of barcodes by uploading a CSV file with product IDs.
Try our free barcode generator to create unlimited barcodes in any format. No signup, no limits, no watermarks.
Common Mistakes People Make with Barcodes
1. Ignoring Quiet Zones
Every barcode needs blank space (the "quiet zone") on both sides. Without it, scanners can't read the barcode. Make sure your barcode generator includes this automatically, and don't print your barcode right up to a colored background or border.
2. Printing Too Small
A barcode that looks good on your screen might be unreadable when printed. For 1D barcodes, a typical minimum height is 0.5 inches (12mm). If your barcode is smaller than a postage stamp, it won't scan reliably in retail environments.
3. Using the Wrong Format for Your Channel
Putting UPC-A on products destined for European retailers won't work. They expect EAN-13. Using CODE128 for retail products means you'll have to manually assign your own product ID, which defeats the purpose. Know your distribution channel before you generate barcodes.
4. Forgetting About Print Quality
Download your barcode as SVG or high-resolution PNG, not JPEG. JPEG compression introduces artifacts that can confuse barcode scanners. Vector formats like SVG are best because they print crisp at any size.
5. Storing Data Only in the Barcode
A barcode doesn't store detailed product information; it's just a lookup key. The barcode references a database entry. Never assume all the information you need is in the barcode itself. For products sold to retailers, your product details must be in a backend database that matches the barcode.
6. Not Testing Before Printing in Bulk
Generate one test barcode, print it out, and verify it scans with your scanner before you print 10,000 labels. Test with the actual scanner you'll use in your warehouse or store.
When to Use QR Codes Instead
QR codes are a special case. They're 2D barcodes that can store URLs, contact information, or large amounts of text. A standard QR code can hold 3,000+ characters versus 30 for CODE128. They don't require a scanner because any smartphone camera can read them.
Use QR codes when you want customers to access information (a product page, warranty form, contact details) or when you need to store more data than a 1D barcode allows. For simple product tracking and retail checkout, traditional 1D barcodes are still the standard.
Check out our free QR code generator if you need to create dynamic codes that work with smartphones.
Key Takeaway
Don't overthink barcode selection. If you're selling to retail, use UPC-A (North America) or EAN-13 (everywhere else), and drop to EAN-8 only when the package genuinely has no room. For internal use, CODE128 is your best friend. For shipping cases, use ITF-14. For everything else, QR codes work fine. The one step worth getting right before you print is the number: license a GTIN through GS1 if the barcode has to scan at a retailer, and invent your own if it never leaves your own operation. Then generate your barcodes with a free tool, test one on the scanner you will actually use, and you're done.
Generate Your Barcode Now →Related Tools
Barcodes are just part of the puzzle. These tools complement barcode generation for product labeling and inventory:
- QR Code Generator: For 2D codes that store URLs, contact info, and large datasets
- Label Designer: Create professional product labels with barcodes and graphics
- CSV to Barcode Batch Converter: Generate thousands of barcodes from a spreadsheet