How Barcodes Work
Barcodes encode data as a pattern of bars and spaces of varying widths (or dots in 2D codes). Scanning devices — laser scanners or camera-based readers — measure these width ratios and decode them into numbers or text. Different formats offer different data capacities, error correction levels, and use cases.
Common Barcode Formats Compared
| Format | Data Type | Length | Typical Use |
|---|---|---|---|
| Code 128 | Full ASCII | Variable | Logistics, warehousing, shipping labels |
| EAN-13 | Numbers only | Fixed 13 digits | Retail products (international standard) |
| UPC-A | Numbers only | Fixed 12 digits | North American retail products |
| EAN-8 | Numbers only | Fixed 8 digits | Small packaging where space is limited |
| Code 39 | Alphanumeric | Variable | Industrial, automotive, government |
| ITF-14 | Numbers only | Fixed 14 digits | Outer cartons and pallets (GS1) |
| QR Code | Any content | Variable | Mobile scanning, URLs, contact info |
How to Choose the Right Barcode Format
- Retail product listings: EAN-13 (international) or UPC-A (North America) — requires a GS1 registered prefix
- Internal inventory management: Code 128 — flexible alphanumeric, no registration required
- Shipping and logistics: Code 128 or ITF-14 (outer cases) are industry standards
- Mobile scan-to-URL: QR Code — far more data capacity than 1D barcodes
- Legacy scanner compatibility: Code 39 — high tolerance for older industrial scanners
How to Generate a Barcode Online
Use tool.tl's barcode generator:
- Go to tool.tl/barcode-generator
- Select a barcode format (Code 128, EAN-13, UPC-A, etc.)
- Enter the number or text to encode
- Preview and adjust size and display options
- Download as PNG or SVG for printing or embedding in documents
EAN-13 Check Digit Explained
The last digit of EAN-13 and UPC-A barcodes is a check digit, calculated from the preceding digits to verify scan accuracy: