Barcode types: Code 128 vs Code 39, EAN, QR, and more
The common 1D and 2D barcode types, where each is used, Code 128 vs Code 39 compared, and examples you can generate and scan for free.
Barcodes come in two families. 1D (linear) barcodes such as EAN-13, UPC-A, Code 128, and Code 39 store data in the widths of vertical bars. 2D barcodes such as QR Code, Data Matrix, and PDF417 store data in a grid of squares and hold much more. Which one to use depends on where it will be scanned: retail checkouts expect EAN or UPC, warehouses use Code 128 or ITF-14, and phones read QR codes.
1D barcode types
| Type | Characters | Typical use |
|---|---|---|
| EAN-13 / UPC-A | Digits only, fixed length | Retail products |
| EAN-8 / UPC-E | Digits only, short | Small packages |
| Code 128 | All ASCII characters | Shipping labels, FNSKU, logistics |
| GS1-128 | Code 128 with GS1 data fields | Batch, expiry, and weight on cases |
| Code 39 | Uppercase letters, digits, a few symbols | Industry, ID badges, VIN labels |
| Code 93 | Like Code 39, more compact | Logistics |
| ITF-14 | Digits only, 14 digits | Outer cartons |
| Codabar | Digits and a few symbols | Libraries, blood banks |
| GS1 DataBar | Digits, GS1 data | Fresh produce, coupons |
Code 128 vs Code 39
| Code 128 | Code 39 | |
|---|---|---|
| Characters | Full ASCII (upper and lower case, digits, symbols) | Uppercase A–Z, 0–9, and - . $ / + % space |
| Density | High: the same data takes less space | Lower: barcodes get long |
| Check character | Required | Optional |
| Where you see it | Courier labels, Amazon FNSKU, warehouse | Older industrial systems, automotive, ID cards |
For new labels, Code 128 is usually the better choice because it is shorter and accepts any text. Code 39 stays common where older equipment expects it.
2D barcode types
| Type | Where you see it |
|---|---|
| QR Code | Links, payments, Wi-Fi, menus |
| Micro QR | Very small parts and labels |
| Data Matrix | Electronics parts, medicine packs (GS1 DataMatrix) |
| PDF417 | Boarding passes, ID cards, driver licenses |
| Aztec | Train and airline tickets |
| MaxiCode | Parcel sorting by UPS |
Examples to test
The test barcode page shows a sample of all 16 types above, ready to scan or download. To make your own, use the barcode generator, which supports EAN, UPC, Code 128, Code 39, ITF-14, QR, Data Matrix, PDF417, and Aztec.
Which type should you use?
- Selling in shops: EAN-13 or UPC-A with an official GS1 number. See how to get UPC codes.
- Shipping and internal tracking: Code 128.
- Amazon FBA: Code 128 FNSKU labels. See FNSKU vs UPC.
- Linking to a website: QR Code.