Barcodes · Published
Which barcode type should I use?
If a customer, retailer or existing scanner system specifies a barcode type, use that type. If you are labelling products for retail sale, use EAN-13 or UPC-A with a GTIN issued to your business. For anything internal, such as stock, shelves, assets or shipping references, Code 128 is usually the best choice: it holds letters and numbers and stays compact.
Start with who will scan it
The most important question is not which format is best in general, but which format the scanning system expects. A barcode is only useful if the scanner at the other end is set up to read it and the software knows what to do with the data.
Work through these questions in order:
- Has someone specified a type? Retailers, marketplaces, logistics partners and customers often state the barcode they need in their supplier or labelling guidelines. Follow those requirements.
- Will the product be sold at a retail checkout? If so, you need a retail barcode (EAN-13 or UPC-A) carrying a GTIN (Global Trade Item Number), the product number issued through GS1.
- Are you replacing labels in an existing system? Match the format the system already uses, even if it is an older one.
- Is the barcode only for your own use? Choose Code 128 unless you have a reason not to.
Barcode formats compared
The table below summarises the formats available in our Barcode Generator.
| Format | Typical use | Characters it holds |
|---|---|---|
| EAN-13 | Retail products in most countries | 13 digits (GTIN-13), including a check digit |
| UPC-A | Retail products, mainly in the US and Canada | 12 digits (GTIN-12), including a check digit |
| EAN-8 | Very small retail packs | 8 digits (GTIN-8), including a check digit |
| UPC-E | Small retail packs, US and Canada | Compressed form of certain UPC-A numbers |
| ITF-14 | Outer cartons and cases of retail products | 14 digits (GTIN-14), including a check digit |
| Code 128 | Internal stock, shelves, assets, shipping references | Letters, numbers and symbols (full ASCII) |
| Code 39 | Legacy industrial and government systems | Upper-case letters, digits and a few symbols |
| Code 93 | Legacy systems needing a more compact Code 39 alternative | Same as Code 39, in less space |
| ITF | Cartons and other numeric-only uses | Digits only, in an even number |
| Codabar | Libraries, blood banks, older systems | Digits and a few symbols, with A–D start and stop characters |
| MSI | Warehouse shelving, older retail systems | Digits only |
| Pharmacode | Packaging control on pharmaceutical production lines | A whole number from 3 to 131070 |
| EAN-2 / EAN-5 | Add-ons for periodicals and book prices | 2 or 5 digits, printed next to a main barcode |
| GS1-128 | Cartons, pallets and logistics labels with batch, expiry or weight | GS1 data: a GTIN or SSCC plus other fields, up to 48 characters |
| GS1 DataMatrix | Medicines, medical devices and other small packs | GS1 data in a small square 2D code; needs a camera-based scanner |
Retail products
For goods sold in shops and through most marketplaces, use EAN-13 or UPC-A. The choice between them usually depends on where your GTINs were issued: GS1 organisations in India, the UK and most other countries issue 13-digit numbers, while GS1 US issues 12-digit numbers. Most retail scanners read both. Our guide to EAN-13 and UPC-A covers the difference in detail.
EAN-8 and UPC-E are for packs too small to carry a full-size barcode. EAN-8 numbers are issued separately by GS1, and UPC-E can only represent certain UPC-A numbers, so neither is a simple way to shrink an existing barcode.
Outer cartons and cases
ITF-14 is the usual choice for the outer cartons that products are shipped in. It carries a 14-digit GTIN-14, which identifies the carton and its contents, and it prints reliably on corrugated board. Some trading partners use Code 128 on cartons instead, so check their requirements.
Internal stock, shelves, assets and shipping references
Code 128 is the most versatile general-purpose barcode. It holds upper- and lower-case letters, numbers and symbols, and it is denser than older formats, so the same data takes up less width. Almost every modern handheld scanner and phone scanning app reads it.
Typical uses include stock-keeping unit (SKU) labels, bin and shelf locations, equipment and asset tags, order numbers and shipping references. If you are setting up a new internal system and nobody has specified a type, Code 128 is a safe default.
Older and specialist formats
Several formats remain in use mainly because existing systems depend on them:
- Code 39 is one of the oldest alphanumeric barcodes and is still found in industrial, automotive and government settings. It is wider than Code 128 for the same data. A full-ASCII mode exists, but the scanner must be set up to read it.
- Code 93 holds the same characters as Code 39 but takes less space. It is less widely used, so confirm your scanners support it.
- ITF (Interleaved 2 of 5) encodes digits only and needs an even number of them. It is common on cartons and in some warehouse systems. ITF-14 is a specific 14-digit use of ITF.
- Codabar appears in libraries, blood banks and older courier and medical systems. Each barcode begins and ends with a start or stop character, A, B, C or D.
- MSI is a numeric-only format used mainly for warehouse shelving and some older retail systems. It can use different check digit methods, and the scanner must expect the same one; ours defaults to mod 10.
Pharmacode
Pharmacode is used on pharmaceutical packaging, typically on cartons, leaflets and labels, so that machines on the production line can check the right packaging component is being used. It is not a retail barcode, cannot be scanned at a checkout and does not carry a GTIN. It holds a single whole number from 3 to 131070, and it is read by dedicated line scanners rather than general-purpose ones. Use it only if your packaging line or customer specifies it.
GS1-128 and GS1 DataMatrix
Both carry GS1 data: a product number together with extra details such as a batch or lot number, an expiry date or a serial number. Each detail is marked by an Application Identifier in brackets, for example (01) for the GTIN, (17) for the expiry date and (10) for the batch or lot. GS1-128 is a linear barcode used mainly on cartons and pallets in distribution. GS1 DataMatrix is a small square code used on medicines and medical devices, where regulators in many countries require the batch, expiry and serial number to be machine-readable; it needs a camera-based (2D) scanner. Use them when a customer, distributor or regulation asks for these details in the barcode.
EAN-2 and EAN-5 add-ons
EAN-2 and EAN-5 are short supplementary barcodes printed to the right of a main EAN-13 or UPC-A barcode. EAN-2 is mainly used on magazines and other periodicals to show the issue number. EAN-5 is mainly used on books to show a suggested retail price. They are never used on their own.
Before you print
Whichever format you choose, print a test label at actual size, leave a clear quiet zone (the blank margin either side of the bars) and scan it with the equipment that will be used in practice.
Create your barcode
All the formats in this guide are available in the free Barcode Generator. It runs entirely in your browser, calculates or verifies check digits where the format uses them, and downloads print-ready files with no watermark.