Barcode Ready
← Barcode Guides

Types of Barcodes: 1D and 2D Formats and Their Uses

Barcodes fall into two families. 1D (linear) barcodes are the familiar vertical bars that hold a short string of digits or characters. 2D barcodes, like QR codes, use a grid of squares and hold much more data. The right type depends on what you are labeling and who needs to scan it.

1D barcodes

A 1D barcode is read in a single line across the bars. Most hold under about 50 characters, and many are a pure number. Their strength is simplicity: any scanner reads them quickly, even cheap laser models.

UPC-A has 12 digits and is the retail standard in the United States and Canada. EAN-13 has 13 digits and is the retail standard everywhere else; ISBN book barcodes are EAN-13s. Code 128 is a compact, high-density symbology that can encode the full ASCII character set, which makes it the default for shipping labels and warehouse inventory. Code 39 is an older format using uppercase letters, digits and a few symbols, still common in industrial and government settings, ID badges and automotive parts. ITF-14 is a 14-digit code printed on cartons and cases, usually inside a thick border. GS1-128 is Code 128 with a structured layout for data like batch numbers, expiry dates and pallet IDs, used in logistics and healthcare.

2D barcodes

2D barcodes encode data in both directions, so they hold far more in less space and can include error correction that survives scratches and smudges. They need a camera-based scanner, which every smartphone has.

QR code is the best known, used for links, payments, Wi-Fi sharing and tickets. Data Matrix is a compact square code used on small parts, electronics and pharmaceuticals, where it can be marked directly on metal or plastic. PDF417 is a stacked-row code found on driver licenses and boarding passes, holding well over a kilobyte of data.

Where each type is used

BarcodeFamilyTypical useData it holds
UPC-A1DRetail products in North America12 digits
EAN-131DRetail products worldwide, books13 digits
Code 1281DShipping, inventory, asset tagsFull ASCII
Code 391DBadges, industrial, governmentUppercase, digits, a few symbols
ITF-141DCartons and cases14 digits
GS1-1281DLogistics with batch and date dataStructured fields
QR code2DLinks, payments, marketingThousands of characters
Data Matrix2DSmall parts, medical devicesUp to about 2,300 characters
PDF4172DIDs, boarding passesOver 1 KB

How to choose

When in doubt, ask the party who will scan the code which formats their system accepts. A beautiful barcode no one's scanner is set up to read is useless.

Generate any of them

Barcode Ready has a free generator for each of the common formats: UPC, EAN-13, Code 128, Code 39, ITF-14, GS1-128, QR code, Data Matrix and PDF417. The main barcode generator lets you switch between them. Everything is drawn in your browser and nothing is uploaded.

Printing tips that apply to all types

Try it