Barcode Types Guide — EAN-13 vs UPC vs Code 128
Four barcode types cover almost every job: EAN-13 for shop products worldwide, UPC-A for shop products in the USA and Canada, Code 128 for labels, inventory and shipping, and Code 39 for simple plain labels. This guide compares them side by side, so you can pick the right one in a minute.
Barcode types compared
| Barcode type | What it holds | Length | Check digit | Best for |
|---|---|---|---|---|
| EAN-13 | Digits only | Exactly 13 digits | Yes — last digit, from the first 12 | Shop products outside North America |
| UPC-A | Digits only | Exactly 12 digits | Yes — last digit, from the first 11 | Shop products in the USA and Canada |
| Code 128 | Any printable text | Any length | Built into the code | Labels, inventory, tracking, shipping |
| Code 39 | A–Z, 0–9, space, - . $ / + % | Any length | No (optional) | Simple short labels |
EAN-13 — shop products worldwide
EAN-13 is the 13-digit number printed under the barcode on most products sold in shops outside North America. The last digit is a check digit, worked out from the first 12 digits: for the number 5901234123457, the check digit is 7. If you type 5901234123458, the generator refuses it, because the correct check digit for those first 12 digits is 7, not 8. A number with only 12 digits is refused too — EAN-13 always needs 13 digits. The number itself has to come from GS1 or your retailer; this generator draws the barcode for a number you already have, it cannot give you a new product number.
UPC-A — shop products in the USA and Canada
UPC-A is the 12-digit number on products sold in the USA and Canada, and it works the same way as EAN-13: the last digit is a check digit from the first 11 digits. For example, 036000291452 is valid — its check digit is 2. A UPC-A number can be turned into an EAN-13 number by adding a 0 at the front: 036000291452 becomes 0036000291452, and the check digit stays 2. If the check digit is wrong, or the number is not 12 digits long, the generator refuses it and tells you why.
Code 128 — labels, inventory and shipping
Code 128 is the best choice when the barcode is not a shop product number. It holds any letters and numbers — Hello123 renders straight away — it is compact, and almost every modern scanner reads it. Use it for stock and inventory codes, asset tags, tracking numbers, shipping labels and internal codes. If you are not sure which type to pick, Code 128 is usually the right answer.
Code 39 — simple short labels
Code 39 is the oldest of the four types and almost every scanner reads it, but it takes up more space than Code 128 for the same text, so it is best for short codes. It holds capital letters A to Z, numbers 0 to 9, a space, and the symbols - . $ / + %. Lowercase letters are changed to capitals automatically — type hello-123 and you get HELLO-123. Any other character, such as ! or @, is refused with a clear message, because Code 39 cannot encode it.
How to choose in 4 steps
- Is it a shop product? Use EAN-13 (13 digits) outside North America or UPC-A (12 digits) in the USA and Canada. The number must come from GS1 or your retailer.
- Is it a label, stock code or tracking number? Use Code 128 — any letters and numbers, compact, read by almost every scanner.
- Is the code short and simple? Use Code 39 for short codes with only capital letters, numbers and a few symbols, such as HELLO-123.
- Test before printing. Create the barcode on the free barcode generator, print one copy, and test it with a real scanner or a phone barcode-scanner app before printing at scale.
Frequently asked questions
What is the difference between EAN-13 and UPC-A?
Both are the numbers printed under the barcode on shop products. EAN-13 has 13 digits and is used in most of the world; UPC-A has 12 digits and is used in the USA and Canada. A UPC-A number can be turned into an EAN-13 number by adding a 0 at the front — 036000291452 becomes 0036000291452, and the check digit stays 2. Both have a check digit as the last digit, worked out from the digits before it.
When should I use Code 128?
Use Code 128 when the barcode is not a shop product number — for labels, stock and inventory, asset tags, tracking numbers, shipping labels and internal codes. It holds any letters and numbers, it is compact, and almost every modern scanner reads it. If you are not sure which type to pick, Code 128 is usually the right answer.
When should I use Code 39?
Use Code 39 for simple labels where the code is short and only uses capital letters, numbers and a few symbols. It is the oldest of the four types and almost every scanner reads it, but it takes up more space than Code 128 for the same text, so it is best for short codes like HELLO-123, not long ones.
Do I need to register my barcode number?
For a shop product, yes — the number itself has to come from GS1 (the organisation that issues product numbers), or from your retailer, before it will scan correctly at a till. This generator draws the barcode for a number you already have; it cannot give you a new product number. For internal labels, stock codes and tracking numbers, no registration is needed — you can make up any code that fits the rules of the type.
Why was my number refused?
The generator refuses a number when it breaks the rules of its type, and says why. EAN-13 needs exactly 13 digits with the right check digit; UPC-A needs exactly 12 digits with the right check digit; Code 39 needs only capital letters, numbers, a space and - . $ / + %. Fix the number and try again — never print a barcode the generator refused, because it will not scan.
Share this tool
Found this tool useful? Share it with someone who needs it: #BarcodeTypes #EAN13 #UPCBarcode #Code128 #Code39 #BarcodeGenerator #FreeTools