EAN-13 vs UPC-A vs Code 128: Which Barcode Do You Need?
Barcodes look alike, but each type is made for a different job. Choosing the wrong one can mean a product that won't scan at the till. This guide explains the common types in plain words.
The quick answer
If you only need a fast decision, start here:
- Selling products in shops in the United States or Canada: UPC-A.
- Selling products in shops in Europe or most other countries: EAN-13.
- Very small retail packaging: EAN-8.
- Shipping, warehouse or stock labels: Code 128.
- An older system that already uses it: Code 39.
Barcodes for retail products
These types are used on products sold in shops:
- EAN-13: 13 digits, the standard for retail products in most of the world.
- UPC-A: 12 digits, the standard for retail products in the United States and Canada.
- EAN-8: 8 digits, a shorter version for very small packages.
How EAN-13 and UPC-A are related
UPC-A and EAN-13 are close relatives. A UPC-A number is the same as an EAN-13 number that starts with a zero, so 036000291452 as a UPC-A matches 0036000291452 as an EAN-13. Modern shop scanners worldwide read both, which is why products with a UPC code can usually be sold in other countries without a new barcode.
Books use EAN-13 too. The ISBN on the back of a modern book is an EAN-13 number starting with 978 or 979.
Barcodes for labels and internal use
These types are used inside a business, for stock, shipping and asset tracking:
- Code 128: holds letters, numbers and symbols in a compact space. A strong choice for shipping and warehouse labels.
- Code 39: holds capital letters, numbers and a few symbols. It is older and wider, but many scanners still support it.
Why Code 128 usually beats Code 39
Both can store a stock code like BOX-1042, but Code 128 packs the same information into fewer bars, so the label comes out narrower. It can also store lowercase letters. Code 39 grows wide quickly as you add characters, which matters on a small label.
Choose Code 39 when an older scanner or software system requires it. If you are starting fresh, Code 128 is the better default.
How the check digit works
The last digit of an EAN or UPC barcode is a check digit. It is calculated from the other digits, and it lets a scanner catch a misread. If one digit is read wrongly, the sum no longer matches and the scanner rejects it instead of ringing up the wrong product.
Here is the sum for the EAN-13 number 4006381333931, using its first 12 digits. Add the digits in odd positions: 4+0+3+1+3+9 = 20. Add the digits in even positions: 0+6+8+3+3+3 = 23, then multiply by 3 to get 69. The total is 20 + 69 = 89. The check digit is whatever takes that up to the next multiple of 10, so 90 - 89 = 1. That is the final digit of the barcode.
You don't need to do this by hand. A good barcode generator works it out for you, but it helps to know why a number with a wrong final digit gets refused.
Selling in stores? You may need a registered number
Anyone can draw a barcode, but a generator does not give you an official product number. Large retailers and marketplaces usually ask for a number registered through GS1, the organization that manages these codes. Check what your retailer requires before you print packaging.
Be careful with numbers that are resold cheaply online. A retailer may reject them if they don't belong to your company, or they may already be linked to someone else's product.
For your own stock, shelf labels or shipping boxes, you can use any numbering you like.
A simple numbering plan for your own stock
For internal labels, a clear pattern saves trouble later. Use a short prefix for the type of item and a running number, such as MUG-0001 and MUG-0002. Keep codes the same length, avoid spaces, and keep a simple spreadsheet that shows what each code means. Never reuse a code for a different item.
Size and placement
At standard size, an EAN-13 barcode including its margins is about 37 mm wide and 26 mm tall. You can shrink it a little, but retail standards allow only limited reductions, and cutting the height can make scanning slower.
On packaging, put the barcode on a flat area, away from folds, seams and edges. Scanners need empty space on both sides, called the quiet zone, so keep text and borders away from the bars.
Printing tips
Use dark bars on a white background, and leave clear empty space on both sides of the barcode. Black is safest. Avoid red bars, because many scanners use red light and can't see them, and avoid printing on shiny or patterned surfaces.
Download SVG for sharp printing, and test a printed sample with a scanner or phone app before you print a large batch. Don't stretch a low-resolution image, since blurred bars are a common reason for failed scans.
