Every Barcode Type Explained: 1D, 2D and Beyond

Different types of 1D and 2D barcodes explained

Barcodes fall into two broad categories: 1D and 2D. Together they cover more than 30 formats in everyday use, from Code 39 to QR codes. Knowing the difference makes it easier to match the right barcode scanners to your stock.

1D barcodes, also called linear barcodes, store data in a strip of parallel lines and hold up to about 25 characters. 2D barcodes store data in a grid and can hold thousands of characters, including web links.

This guide covers the most common barcode types you will come across, what each one looks like and where businesses typically use it. Images are included for every format so you can identify them at a glance.

What Is a Barcode, Exactly?

A barcode is a machine-readable pattern that encodes data using symbology, a defined set of rules for arranging bars, spaces, squares or dots. A scanner reads the pattern and decodes it into text or numbers.

Every barcode type has its own symbology, which is why they look so different from one another. For a closer look at spotting each pattern, our guide on how to identify barcode types visually breaks down the visual cues.

1D Barcode Types (Linear Barcodes)

1D barcodes are the original barcode format and remain the backbone of retail and logistics. They use varying bar widths and spacing to encode data, read in a single horizontal scan.

Matching each format to the right hardware matters, since not every scanner reads every symbology. Our guide to choosing the right barcode scanner covers handheld, wireless and fixed options.

Code 39

Code 39 is a widely used 1D barcode in healthcare, electronics and government settings. It encodes the full alphanumeric character set and can be any length, which makes it flexible for internal tracking codes.

scan1

Code 39: NNWWWN pattern of narrow and wide bars, used for alphanumeric tracking codes.

Code 128

Code 128 is a compact, high-density barcode common in packaging, shipping and logistics. It supports the full ASCII character set and automatically switches between character modes to keep labels small.

scan2

Code 128: a compact linear barcode used across packaging and shipping.

UPC (Universal Product Code)

UPC barcodes are the standard on retail products across Australia and other markets. A UPC-A code holds 12 digits and typically identifies the manufacturer and specific product at the checkout scanner.
scan3

UPC-A: 12 digits, the standard retail barcode seen at checkout.

EAN (International Article Number)

EAN is a superset of UPC used widely outside North America, including on Australian retail and book products. EAN-13 stores 13 digits and follows the same scanning principle as UPC.

scan4EAN-13: 13 digits, common on Australian retail and book products.

Other 1D formats include Codabar, used in libraries and blood banks; Interleaved 2 of 5, used on cartons and pallets; and GS1 DataBar, a compact format used on fresh produce and coupons.

2D Barcode Types (Matrix Barcodes)

2D barcodes pack far more data into a smaller space and can be read from any angle. A 2D imaging scanner is required to decode them, unlike basic 1D scanners.

QR Code (Quick Response Code)

QR codes are the most recognisable 2D barcode, widely used in marketing, payments and packaging. They can store web addresses, contact details or plain text, and most smartphones can scan them without an app.

scan6QR code: three bold corner squares are the easiest way to identify it.

Data Matrix

Data Matrix codes are compact and highly reliable, which makes them popular in healthcare, electronics and manufacturing. A single small square can encode up to around 2,000 characters, even on curved or tiny surfaces.

scan5

Data Matrix: a dense square grid, often printed on small components.

PDF417

PDF417 is a stacked linear barcode used on identification documents, boarding passes and shipping labels. It can hold large amounts of structured data, including names, dates and reference numbers, in one scan.

scan7

PDF417: a stacked barcode used on ID cards, licences and boarding passes.

Aztec code is another 2D format, best known for its use on airline tickets and event boarding passes. It doesn’t need a quiet border zone, so it can be printed in less space than a QR code.

How to Tell Barcode Types Apart at a Glance

Look at the overall shape first. 1D barcodes are wide rectangles made of vertical lines. 2D barcodes are square or near square grids made of smaller cells.

Next, check for finder patterns. QR codes have three bold squares in the corners. Data Matrix codes have a solid dark line along two adjacent sides. UPC and EAN codes have matching guard bars at each end.

Which Barcode Format Should Your Business Use?

Retailers selling packaged goods generally rely on UPC or EAN codes at the point of sale. Warehousing and logistics operations often lean on Code 128 or GS1 DataBar for cartons and pallets.

Healthcare and electronics businesses frequently choose Data Matrix for small components, while marketing and hospitality teams reach for QR codes to link straight to a website or menu.

The right format depends on the data you need to store, the surface you’re printing on and the barcode scanners already in use across your stock control and inventory management systems.

Frequently Asked Questions

What is the most common barcode type?

UPC and EAN are the most common barcode types worldwide, appearing on the majority of retail products sold in supermarkets, pharmacies and convenience stores across Australia and internationally.

Can one barcode scanner read every barcode type?

Not always. Standard 1D scanners only read linear barcodes such as Code 39, Code 128, UPC and EAN. To read 2D formats like QR codes and Data Matrix, you need a 2D imaging scanner.

What’s the difference between a barcode and a QR code?

A QR code is one specific type of 2D barcode. All QR codes are barcodes, but not all barcodes are QR codes. Standard 1D barcodes look completely different, with vertical lines instead of a square grid.

How many characters can a barcode hold?

It depends on the format. Most 1D barcodes hold up to about 25 characters. 2D barcodes such as Data Matrix and QR codes can hold hundreds or even thousands of characters, including full web addresses.

Are all barcode formats free to use?

Symbologies themselves are generally open standards and free to use. Retail formats like UPC and EAN, however, require registration through GS1 to get a unique, licensed product number.

With more than 30 barcode types in active use, getting the match right between your format and your scanning hardware matters.

Call 1800 431 539 or visit the ASP Microcomputers homepage to explore the full range.