Guide
Types of barcodes, with example images
There are more than a hundred barcode formats on record, but about fourteen cover nearly everything you will meet on a product, parcel, ticket or ID card. They fall into two families. Linear (1D) barcodes are a row of bars read in one sweep, and they usually hold a number of 8 to 20 characters. 2D barcodes are a grid read as an image, and they hold up to a few thousand characters.
Every image below is a real barcode, generated by the same code as the barcode generator. Point a phone at one and it will scan.
Not sure which type you have? Scan it and the result names the format.
Open the online barcode scannerLinear (1D) barcodes
UPC-A
Twelve digits. The retail barcode of the United States and Canada, on almost every product in a supermarket there. It holds a company prefix, an item number and a check digit, and nothing about price. See what UPC numbers mean, or read one with the UPC scanner.
UPC-E
A squeezed UPC for small packs such as soda cans and cosmetics. It prints 8 digits but stands for a full 12-digit UPC-A with zeros removed.
EAN-13
Thirteen digits. The retail barcode everywhere outside North America, and the format of the ISBN barcode on books. A UPC-A is an EAN-13 with a leading zero. The first three digits are a GS1 country prefix. Compare the two in EAN vs UPC.
EAN-8
Eight digits, for packs too small for an EAN-13, such as lip balm and chewing gum.
Code 128
Letters, digits and punctuation, at any length, in a compact width. The workhorse of shipping labels, tracking numbers and warehouse tags. When it follows GS1 rules for dates, lots and pallet numbers it is called GS1-128. The Code 128 reader decodes both.
Code 39
Capital letters, digits and seven symbols. Dating from 1974, it is wider than Code 128 for the same data but simple enough to print with a barcode font. Still common on name badges, asset tags and in defence and automotive supply chains.
Code 93
A denser successor to Code 39 with two check characters. Used by Canada Post and on some electronic components.
ITF-14
Fourteen digits inside a thick black frame. Printed on outer cartons, because its wide bars survive rough printing on corrugated cardboard. The number is a GTIN-14, which identifies the case and not the single item inside. See what is a GTIN.
Codabar
Digits and a few symbols, wrapped in start and stop letters A to D. An older format that lives on in libraries, blood banks and photo labs.
GS1 DataBar
A small barcode that carries a full 14-digit GTIN. Found on the stickers on loose fruit and vegetables and on coupons. The expanded version can add a weight or an expiry date.
2D barcodes
QR Code
Three large squares in the corners make it easy to recognize. Invented in Japan in 1994 for tracking car parts, it now carries links, payments, Wi-Fi logins and tickets. It holds up to 4,296 letters and digits and still reads with up to 30% of the symbol damaged. Read one with the QR code scanner.
Data Matrix
A solid L on two sides and a dotted edge on the other two. It packs data into a smaller space than QR and reads when only 2 to 3 mm across, so it is used on medicine packs, medical devices and electronic parts. Read one with the Data Matrix scanner.
PDF417
A wide rectangle of stacked rows. It holds about 1,800 characters and is the barcode on the back of US and Canadian driver’s licenses and on printed boarding passes. The PDF417 scanner turns its contents into labeled fields.
Aztec
A bullseye in the centre and no need for a blank border, which lets it sit in tight spaces. Common on rail tickets and on airline boarding passes shown on a phone.
Barcode types at a glance
| Type | Kind | Holds | Where you see it |
|---|---|---|---|
| UPC-A | 1D | 12 digits | Retail, US and Canada |
| UPC-E | 1D | 8 digits | Small retail packs |
| EAN-13 | 1D | 13 digits | Retail worldwide, books |
| EAN-8 | 1D | 8 digits | Very small packs |
| Code 128 | 1D | Any text | Shipping, logistics |
| Code 39 | 1D | Capitals, digits | Badges, asset tags |
| Code 93 | 1D | Capitals, digits | Post, components |
| ITF-14 | 1D | 14 digits | Shipping cartons |
| Codabar | 1D | Digits, symbols | Libraries, blood banks |
| GS1 DataBar | 1D | 14 digits plus extras | Fresh produce, coupons |
| QR Code | 2D | About 4,300 characters | Links, payments, tickets |
| Data Matrix | 2D | About 2,300 characters | Healthcare, electronics |
| PDF417 | 2D | About 1,800 characters | ID cards, boarding passes |
| Aztec | 2D | About 3,000 characters | Rail and air tickets |
Which one should you use?
If you are selling in stores, you do not get a choice: UPC-A in North America or EAN-13 elsewhere, with numbers licensed from GS1. For labeling your own stock, shelves or equipment, use Code 128. It takes letters, it is compact, and practically every scanner reads it. To send someone to a web page, use a QR Code. For something tiny, Data Matrix. For outer cartons, ITF-14.
The barcode generator makes all of these. For a closer look at the grid formats, read 2D barcodes explained.
Sources
- GS1 General Specifications. The standard for GTIN structure, check digits and application identifiers.
- GS1: barcode standards overview
- Denso Wave: QR Code versions and capacity
- ISO/IEC 15417 (Code 128), 16388 (Code 39), 16022 (Data Matrix), 15438 (PDF417), 24778 (Aztec). The symbology specifications.
Spotted a mistake? Email [email protected].