Barcode types at a glance
In short: A barcode encodes data as a pattern of bars (1D) or areas (2D). There are many types: EAN-13 in retail, Code 128 in logistics, QR code and Data Matrix as 2D codes.
In more detail: 1D codes are read by scanners with a single line and store little (usually a number). 2D codes are read as an image and hold much more, with error correction.
In detail
| Type | Kind | Content | Typical use |
|---|---|---|---|
| EAN-13 / EAN-8 | 1D | 13 or 8 digits | retail products (Europe) |
| UPC-A | 1D | 12 digits | retail in USA/Canada |
| Code 128 | 1D | all ASCII characters | logistics, shipping labels, inventory |
| Code 39 | 1D | digits, capital letters, few characters | industry, ID cards |
| ITF-14 / Interleaved 2 of 5 | 1D | digits | outer cartons, pallets |
| Codabar | 1D | digits, few characters | libraries, blood banks |
| QR code | 2D | up to about 4,000 characters | links, tickets, payments |
| Data Matrix | 2D | compact, up to about 2,300 characters | medicines, electronics, small parts |
| PDF417 | 2D (stacked) | much text | boarding passes, ID documents |
| Aztec | 2D | like QR, no quiet zone | train tickets |
- Check digit: many codes have a control digit, see EAN-13 and the check digit.
- Quiet zone: an empty margin around the code must stay free, otherwise the scanner will not read.
- Choice: for short numbers in retail EAN, for own inventory Code 128, for links and lots of content QR.
- Creating: example Code 128 in this site’s inventory tool, see Code 128 in detail.
See also: Barcode scanners: technology and types, Barcode scanner