---
title: "Types of Barcodes: Every Common Type and When to Use It"
description: "Free plain-English guide to the types of barcodes: UPC, EAN, Code 128, Code 39, ITF-14, GS1-128, QR, Data Matrix and PDF417, with examples and a decision table."
url: https://barcodejar.com/guides/types-of-barcodes
source: BarcodeJar (free barcode tools)
---

# Types of Barcodes

There are two families of barcodes: linear (1D) codes such as UPC, EAN, Code 128 and Code 39, and 2D codes such as QR Code, Data Matrix and PDF417. Which one you need depends on where it will be scanned and what data it carries.

**Short answer:** use [UPC-A](https://barcodejar.com/upc-barcode-generator) or [EAN-13](https://barcodejar.com/ean-13-barcode-generator) for retail products, [Code 128](https://barcodejar.com/code-128-barcode-generator) for inventory and shipping labels, [ITF-14](https://barcodejar.com/itf-14-barcode-generator) or [GS1-128](https://barcodejar.com/gs1-128-barcode-generator) for cartons and pallets, and a [QR code](https://barcodejar.com/qr-code-generator) for anything people scan with a phone. Data Matrix and PDF417 are for packing a lot of data into a small space, such as medicine packs and ID cards.

## What is the difference between 1D and 2D barcodes?

A **linear (1D) barcode** is the familiar row of black bars and white spaces. The data is in the widths of the bars, read along a single line by a laser or camera scanner. Linear codes are cheap to print and read very quickly, but they hold little data (usually a product or reference number of 8 to about 40 characters) and get wide as the data grows.

A **2D barcode** stores data in a grid of square modules or dots, both horizontally and vertically. It holds far more (a QR code can carry a full web address, a contact card or several thousand digits) and includes error correction, so it still reads if part of it is scratched or covered. 2D codes need a camera-based (imaging) scanner or a phone; classic laser scanners can’t read them.

[Linear: EAN-13](https://barcodejar.com/ean-13-barcode-generator)

[2D: QR Code](https://barcodejar.com/qr-code-generator)

## Retail barcodes: UPC and EAN

Products sold in shops carry a **GTIN** (Global Trade Item Number) issued under a GS1 licence, printed as a UPC or EAN barcode. **UPC-A** holds 12 digits and is the traditional code in the US and Canada. **EAN-13** holds 13 digits and is used everywhere else; a UPC-A is simply an EAN-13 with a leading zero, and checkout systems worldwide read both. **UPC-E** and **EAN-8** are shorter versions for packs too small for the full code. Books use EAN-13 barcodes that start with 978 or 979 (the ISBN). Read [UPC vs EAN](https://barcodejar.com/guides/upc-vs-ean) for the details.

[UPC-A](https://barcodejar.com/upc-barcode-generator)

[UPC-E](https://barcodejar.com/upc-e-barcode-generator)

[EAN-8](https://barcodejar.com/ean-8-barcode-generator)

[ISBN (EAN-13)](https://barcodejar.com/isbn-barcode-generator)

## Logistics and inventory barcodes

**Code 128** is the workhorse of warehouses and shipping labels. It encodes all 128 ASCII characters, switches to a compact mode for long runs of digits, and every scanner reads it. **GS1-128** is Code 128 with GS1 rules: the data is split into fields by Application Identifiers, such as (01) for the GTIN, (17) for the expiry date, (10) for the batch and (00) for the SSCC pallet number.

**Code 39** is older and less dense but still required by some automotive, defence and healthcare systems. **ITF-14** (Interleaved 2 of 5 with a 14-digit GTIN) tolerates the rough printing on corrugated cartons and is usually framed by a thick bearer bar. **Codabar** survives in libraries and blood banks.

[Code 128](https://barcodejar.com/code-128-barcode-generator)

[GS1-128](https://barcodejar.com/gs1-128-barcode-generator)

[Code 39](https://barcodejar.com/code-39-barcode-generator)

[ITF-14](https://barcodejar.com/itf-14-barcode-generator)

## 2D barcodes: QR, Data Matrix, PDF417 and Aztec

**QR Code** is the 2D code people know, because every phone camera reads it: menus, payments, WiFi and links. **Data Matrix** is smaller for the same data and is the standard for marking electronic components, medical devices (UDI) and medicine packs as **GS1 DataMatrix**. **PDF417** is a stacked code found on US and Canadian driver’s licences and many shipping documents. **Aztec** needs no quiet zone and is widely used on rail and airline mobile tickets.

[Data Matrix](https://barcodejar.com/data-matrix-generator)

[PDF417](https://barcodejar.com/pdf417-generator)

[Aztec Code](https://barcodejar.com/aztec-code-generator)

## Barcode types compared

| Type | Kind | Data | Typical use |
| --- | --- | --- | --- |
| [UPC-A](https://barcodejar.com/upc-barcode-generator) | 1D | 12 digits (GTIN-12) | Retail products, US and Canada |
| [UPC-E](https://barcodejar.com/upc-e-barcode-generator) | 1D | 8 digits (compressed UPC-A) | Small packs in North America |
| [EAN-13](https://barcodejar.com/ean-13-barcode-generator) | 1D | 13 digits (GTIN-13) | Retail products worldwide, books (ISBN) |
| [EAN-8](https://barcodejar.com/ean-8-barcode-generator) | 1D | 8 digits (GTIN-8) | Very small retail packs |
| [Code 128](https://barcodejar.com/code-128-barcode-generator) | 1D | All 128 ASCII characters | Shipping, inventory, warehouse labels |
| [GS1-128](https://barcodejar.com/gs1-128-barcode-generator) | 1D | GS1 data with Application Identifiers | Pallets, cases, batch and expiry dates |
| [Code 39](https://barcodejar.com/code-39-barcode-generator) | 1D | A–Z, 0–9, space and - . $ / + % | Automotive, defence, ID badges |
| [ITF-14](https://barcodejar.com/itf-14-barcode-generator) | 1D | 14 digits (GTIN-14) | Outer cartons and corrugated boxes |
| [Interleaved 2 of 5](https://barcodejar.com/interleaved-2-of-5-barcode-generator) | 1D | Digits, even count | Warehousing, cartons |
| [Codabar](https://barcodejar.com/codabar-barcode-generator) | 1D | Digits and - $ : / . + | Libraries, blood banks, older systems |
| [GS1 DataBar](https://barcodejar.com/gs1-databar-generator) | 1D / stacked | GTIN, plus extra data in Expanded | Fresh food, coupons, small items |
| [Intelligent Mail](https://barcodejar.com/intelligent-mail-barcode-generator) | 4-state | 20–31 digits | US mail sorting (USPS) |
| [QR Code](https://barcodejar.com/qr-code-generator) | 2D | Up to 7,089 digits or ~2,900 characters | Links, WiFi, payments, marketing |
| [Data Matrix](https://barcodejar.com/data-matrix-generator) | 2D | Up to 3,116 digits or 2,335 characters | Parts marking, healthcare (UDI), pharma |
| [GS1 DataMatrix](https://barcodejar.com/gs1-datamatrix-generator) | 2D | GS1 data: GTIN, batch, expiry, serial | Medicines, medical devices |
| [PDF417](https://barcodejar.com/pdf417-generator) | Stacked 2D | Up to ~1,850 characters | Driver’s licences, ID cards, shipping |
| [Aztec Code](https://barcodejar.com/aztec-code-generator) | 2D | Up to ~3,000 characters | Train and airline tickets |
| [MaxiCode](https://barcodejar.com/maxicode-generator) | 2D | Up to 93 characters | UPS parcel sorting |
| [Micro QR](https://barcodejar.com/micro-qr-code-generator) | 2D | Up to 35 digits | Tiny parts and labels |

BarcodeJar supports over 100 symbologies, including postal, pharmaceutical and composite codes. Browse them all on the [barcode types](https://barcodejar.com/barcode-types) page.

## Which barcode should I use?

Start from where the code will be scanned and who controls the scanner. Retail checkouts expect GS1 codes; your own warehouse can use anything your scanners read; customers with phones need a QR code.

| If you need to… | Use | Notes |
| --- | --- | --- |
| Selling a product in shops or online marketplaces | [UPC-A](https://barcodejar.com/upc-barcode-generator) (US/Canada) or [EAN-13](https://barcodejar.com/ean-13-barcode-generator) | Needs a GS1-licensed GTIN |
| Publishing a book | [ISBN barcode](https://barcodejar.com/isbn-barcode-generator) (EAN-13 starting 978/979) | Needs an ISBN from your national agency |
| Labelling stock, bins or SKUs inside your business | [Code 128](https://barcodejar.com/code-128-barcode-generator) | Any letters and numbers you choose |
| Marking shipping cartons of a retail product | [ITF-14](https://barcodejar.com/itf-14-barcode-generator) or [GS1-128](https://barcodejar.com/gs1-128-barcode-generator) | GTIN-14 for the case |
| Pallet labels with batch, expiry or SSCC | [GS1-128](https://barcodejar.com/gs1-128-barcode-generator) | Use the [SSCC generator](https://barcodejar.com/sscc-generator) for pallet IDs |
| Amazon FBA units | [FNSKU label](https://barcodejar.com/fnsku-barcode-generator) (Code 128) | Amazon assigns the FNSKU |
| Asset tags, ID badges, library cards | [Code 128](https://barcodejar.com/code-128-barcode-generator) or [Code 39](https://barcodejar.com/code-39-barcode-generator) | Code 39 if old scanners require it |
| Small parts or lots of data in a tiny space | [Data Matrix](https://barcodejar.com/data-matrix-generator) | Needs a 2D imaging scanner |
| Medicines and medical devices | [GS1 DataMatrix](https://barcodejar.com/gs1-datamatrix-generator) | Follow your regulator’s UDI or serialisation rules |
| Something customers scan with a phone | [QR code](https://barcodejar.com/qr-code-generator) | Static QR codes never expire |
| ID cards or documents with lots of text | [PDF417](https://barcodejar.com/pdf417-generator) | Common on driver’s licences |

## How do I check a barcode will scan?

Before printing a run, check three things. First, the number: retail codes end in a check digit, which you can confirm with the [check digit calculator](https://barcodejar.com/check-digit-calculator) or [barcode validator](https://barcodejar.com/barcode-validator). Second, the size and quiet zone: see the [barcode size guide](https://barcodejar.com/guides/barcode-size-guide). Third, the print itself: scan a proof with a phone using our [barcode scanner](https://barcodejar.com/barcode-scanner), ideally also with the scanner that will be used in practice.

## Frequently asked questions

### What are the main types of barcodes?

Barcodes are either linear (1D) or two-dimensional (2D). The most common linear types are UPC and EAN for retail products, Code 128 and Code 39 for logistics and inventory, ITF-14 for shipping cartons and GS1-128 for supply-chain data. The most common 2D types are QR Code, Data Matrix, PDF417 and Aztec.

### What type of barcode is used on products in stores?

UPC-A in the US and Canada and EAN-13 almost everywhere else. Both encode a GS1 product number (GTIN), and modern checkout scanners read both. Small packs may use the shorter UPC-E or EAN-8.

### Which barcode is best for inventory?

[Code 128](https://barcodejar.com/code-128-barcode-generator) is the usual choice for internal inventory, SKU and bin labels: it encodes letters and numbers, is compact and every scanner reads it. If you need more data in a small space, or want phones to scan it, use [Data Matrix](https://barcodejar.com/data-matrix-generator) or a QR code.

### Can my phone scan every type of barcode?

Phone cameras read QR codes natively. Most other common types (UPC, EAN, Code 128, Code 39, Data Matrix, PDF417, Aztec) can be read with a scanner app or our [online barcode scanner](https://barcodejar.com/barcode-scanner). Laser scanners read only linear barcodes; reading 2D codes needs an imaging (camera-based) scanner.

### Do I need permission to use a barcode type?

No. The symbologies themselves are open standards that anyone can print. What you may need is a valid number: retail UPC/EAN codes must carry a GTIN licensed from GS1. Internal codes such as Code 128 asset tags can hold any data you like.

### What is the difference between a 1D and a 2D barcode?

A 1D barcode stores data in the widths of parallel bars and is read across one line, holding roughly 20–50 characters. A 2D barcode stores data in a grid of squares or dots, holds hundreds to thousands of characters, and keeps working when part of it is damaged thanks to error correction.

## Related free tools

[**UPC vs EAN**The difference, and which one you need.](https://barcodejar.com/guides/upc-vs-ean)[**QR Code vs Barcode**1D vs 2D codes and which to choose.](https://barcodejar.com/guides/qr-code-vs-barcode)[**How to Get a Barcode for Your Product**GS1, resellers, Amazon and retail rules explained.](https://barcodejar.com/guides/how-to-get-a-barcode-for-your-product)[![Code 128 Generator example](/thumbs/code128.svg)**Code 128 Generator**Create Code 128 barcodes free. PNG, SVG, PDF.](https://barcodejar.com/code-128-barcode-generator)[![UPC-A Generator example](/thumbs/upca.svg)**UPC-A Generator**Create UPC-A barcodes free. PNG, SVG, PDF.](https://barcodejar.com/upc-barcode-generator)[**QR Code Generator**Free static QR codes with colors and logo. No sign-up.](https://barcodejar.com/qr-code-generator)[**Online Barcode Scanner**Scan any barcode with your phone or webcam camera.](https://barcodejar.com/barcode-scanner)
