What is a Barcode?
A barcode is a graphical identifier composed of parallel lines (bars) and spaces of varying widths arranged according to specific encoding rules. Invented in 1952, it is one of the earliest automatic identification technologies and remains the most widely used encoding method in global commerce and logistics.
Barcodes work by using optical scanners to read the reflectance differences between dark bars and light spaces. Different barcode standards (formats) are suited for different industries and use cases. Choosing the right format is key to ensuring encoding accuracy and compatibility.
Common Barcode Formats Comparison
| Format | Character Support | Length | Typical Use |
|---|---|---|---|
| CODE128 | All ASCII characters (digits, letters, symbols) | Variable | Logistics, parcel labels, inventory management. Most versatile — recommended as default. |
| EAN-13 | Digits only | Fixed 13 digits | International standard product barcode, most common on retail packaging. First 3 digits indicate country code. |
| EAN-8 | Digits only | Fixed 8 digits | Shortened version of EAN-13, used on small-packaged products like gum or pencils. |
| UPC | Digits only | Fixed 12 digits | Primarily used in North America, similar to EAN-13, widely used in US and Canadian retail. |
| CODE39 | Digits, uppercase letters, some symbols | Variable | Industrial manufacturing, military, and government. No check digit needed, simple encoding but lower density. |
| ITF-14 | Digits only | Fixed 14 digits | Outer carton identification for shipping packages. Readable even when printed on corrugated cardboard. |
| Pharmacode | Digits only (3 – 131070) | Variable | Pharmaceutical industry — used for automated detection and sorting on drug packaging lines. |
How to Choose a Barcode Format?
General Purpose
Choose CODE128 — supports the widest character set, high density, readable by virtually all scanners.
Retail Products
Use EAN-13 for international products, UPC for North American products. Number ranges must be registered with a GS1 organization.
Industrial / Logistics
Parcel labels: CODE128. Outer cartons: ITF-14. Military/government: CODE39.
Pharmaceutical
Choose Pharmacode for drug packaging production lines — designed specifically for pharmaceutical use with bidirectional scanning.