Skip to content

Barcode Types Explained: Which Format Should You Use?

Barcodes fall into two families: linear (1D) codes like EAN-13 and Code 128 that store a short number or ID, and 2D codes like QR and Data Matrix that store much more in a small square. The right one depends on who scans it and what it needs to hold.

By PureTools Editorial TeamUpdated 8 min read

1D vs 2D barcodes

A linear or 1D barcode stores data in the widths of parallel bars and spaces. It is read along a single line, which is why classic laser scanners work with it. Linear codes hold a few dozen characters at most and are usually a key that points to a record in a database, such as a product number.

2D barcodes store data in both directions, in a grid of modules or in stacked rows. They hold hundreds or thousands of characters, include strong error correction and can be read from any angle by camera-based scanners, including phones.

Linear (1D) barcode formats

FormatDataWhere it is used
EAN-1313 digitsRetail products worldwide
UPC-A12 digitsRetail products in the US and Canada
Code 128Full ASCII, variable lengthShipping, logistics, inventory, serial numbers
Code 39Upper case, digits, 7 symbolsAutomotive, defense, ID badges
ITF-1414 digitsOuter cartons and shipping cases
CodabarDigits and 6 symbolsLibraries, labs, blood banks, air waybills
PharmacodeInteger 3-131070Pharmaceutical packaging line control

Two-dimensional (2D) barcode formats

FormatCapacity (approx.)Where it is used
QR code4,296 alphanumeric charactersMarketing, payments, menus, anything scanned by phones
Micro QR35 digitsVery small parts and electronics
Data Matrix2,335 alphanumeric charactersParts marking, pharma serialisation, electronics
PDF4171,850 text charactersDriver licenses, boarding passes, documents
Aztec3,000 text charactersRail and airline tickets on phones
Data Matrix and QR code symbols side by side, showing the solid L-shaped edge and the three corner finder patterns
QR codes orient with three corner finders; Data Matrix uses one L-shaped edge and a clock track.

How to choose: a quick decision guide

  • Selling a product in shops or on large marketplaces? Use EAN-13 (or UPC-A in North America) with a GS1-issued number.
  • Labeling outer cases for distributors? Use ITF-14 or GS1-128 with a GTIN-14.
  • Internal inventory, assets, shipping labels or work orders? Use Code 128.
  • Consumers will scan it with a phone? Use a QR code.
  • Tiny space or direct marking on metal and plastic? Use Data Matrix.
  • Tickets on phone screens? Use Aztec. Long records on ID cards? Use PDF417.
  • An existing system already defines the format? Match it exactly, including Code 39 or Codabar.

Things that matter for every format

Whatever the symbology, scanning reliability comes down to the same few factors. Keep a clear quiet zone around the code. Print dark bars or modules on a light, matte background. Do not stretch or squash the image; change the size in the generator instead. Export vector SVG or PDF for print, and test a real printed sample with the actual scanner or phones your audience uses.

Finally, remember that the barcode is only a carrier. For retail formats, the number inside must be registered with GS1. For internal formats, make sure your database or software knows what each value means.

Frequently Asked Questions

What is the most common barcode type?

For retail products, EAN-13 and UPC-A, which appear on almost every packaged item sold in shops. For logistics and internal use, Code 128. For anything scanned by phones, the QR code.

Can a phone scan any barcode?

Phone cameras read QR codes natively. Many also read EAN, UPC and Code 128 through scanner apps or built-in features. Data Matrix, PDF417 and Aztec support varies, so test with your audience devices.

Is a QR code a barcode?

Yes. It is a 2D matrix barcode. "Barcode" covers both linear and two-dimensional symbologies.

Which barcode holds the most data?

Among common formats, QR codes and Aztec codes hold the most, a few thousand characters. Linear barcodes hold only a few dozen.

Sources & further reading

About the author — PureTools Editorial Team

Reviewed against GS1 and ISO symbology specs

Barcode and 2D code pages are reviewed against the GS1 General Specifications and the ISO/IEC bar code symbol standards, then re-checked when a specification is revised.

Editorial policy and corrections