Tools · 4 min read
Barcodes Explained: EAN, UPC, Code 128, and More
Barcodes encode data as bars and spaces of different widths. Different formats exist for retail, shipping, and inventory, and using the wrong one is the most common mistake.
Try it yourself with the related tool.
Generate a barcode →Advertisement
Retail: EAN-13 and UPC-A
Products sold in shops use EAN-13 (worldwide) or UPC-A (North America). They hold only digits, and the numbers are assigned by GS1 — you cannot make up your own for products sold through retailers. EAN-8 is a short version for small packages.
Inventory and shipping: Code 128 and Code 39
Code 128 encodes all ASCII characters compactly and is the standard for shipping labels and internal inventory. Code 39 is older and less dense but still common in industry. Both are free to use for your own IDs.
Check digits
EAN and UPC end with a check digit calculated from the others, so a scanner can detect a misread. If you type in a number with the wrong final digit, a generator should flag it rather than produce a barcode that will not scan.
Printing barcodes that scan
Print dark bars on a light background, keep the quiet zone — the blank margin on each side — and do not stretch the barcode unevenly. Export as SVG or a high-resolution PNG so the bar edges stay sharp, and test with a real scanner or phone before printing in bulk.
