Barcode types: 1D, 2D and postal symbologies

Compare the 19 barcode types the barKoder Barcode Scanner SDK reads, from Code 128 and EAN/UPC to QR Code, Data Matrix, PDF417 and postal codes, with the data each one holds and where it is used.

1D barcode and 2D QR code icons representing supported barcode types

What is a barcode symbology?

A barcode symbology is the set of rules that turns data into a printed pattern: which characters it can hold, how each one is drawn, how a reader finds the start and end, and how errors are caught. Each barcode type is a different symbology, and a scanner must support a symbology to read it.

1D (linear) barcodes store data in the widths of parallel bars and spaces, read along a single line. They usually carry a product number, a serial number or a tracking ID.

Stacked barcodes, such as PDF417 and the stacked DataBar versions, pile several short rows on top of each other to hold more.

2D matrix codes, such as QR Code and Data Matrix, store data in a grid of modules in both directions, so the larger ones hold thousands of characters in a small square and use error correction to survive damage.

Postal barcodes store data in the height of each bar instead of its width.

Barcode type list: 19 symbologies compared

Each row links to the barcode type's own page, with its structure, variants, standards and how to scan it. Capacity is the largest symbol the standard allows. Most labels carry far less.

13

One-dimensional (or 1D) Barcodes

Linear, stacked-linear, composite and postal codes, read along a line.

  • Codabar 1D

    Used on library books and cards, blood bank labels and airbills.

    Specs
    Data
    Digits 0-9 and - $ : / . +, with A, B, C or D as start and stop
    Capacity
    Variable, set by the application
    Typical use
    Library books and cards, blood bank labels, airbills
  • Code 11 1D

    Used mainly to label telecommunications equipment and components.

    Specs
    Data
    Digits 0-9 and the dash
    Capacity
    Variable, no fixed maximum
    Typical use
    Telecommunications equipment labels
  • Code 25 1D

    A family of numeric codes. ITF-14 marks cases, cartons and pallets, and Interleaved 2 of 5 is common in warehousing and distribution.

    Specs
    Data
    Digits only
    Capacity
    Variable by variant; Interleaved 2 of 5 requires an even number of encoded digits. ITF-14 carries 14 digits, including its check digit.
    Typical use
    Cases, cartons and pallets (ITF-14), warehousing, air cargo
  • Code 32 1D

    Used in Italy on packs of medicines, where it encodes the AIC number for dispensing, pharmacy stock and distribution.

    Specs
    Data
    Digits only (the AIC number)
    Capacity
    Fixed: 8 data digits plus 1 check digit
    Typical use
    Medicine packs sold in Italy
  • Code 39 1D

    Used for VINs and automotive parts, defense and government logistics, and manufacturing and healthcare labels.

    Specs
    Data
    43 characters: A-Z, 0-9, space and - . $ / + %. Full ASCII mode encodes all 128 ASCII characters.
    Capacity
    Variable, limited by the label width
    Typical use
    VINs and automotive parts, defense logistics, manufacturing and healthcare labels
  • Code 93 1D

    A denser relative of Code 39. Canada Post uses it for supplementary delivery data, and it also appears on logistics, retail inventory and industrial labels.

    Specs
    Data
    47 characters, including four shift characters for full ASCII
    Capacity
    Variable
    Typical use
    Logistics and postal labels, retail inventory, industrial labels
  • Code 128 1D

    A dense code that encodes all 128 ASCII characters. Used on shipping labels (GS1-128), in warehouse inventory, on automotive parts and on medication and patient labels.

    Specs
    Data
    All 128 ASCII characters plus byte values 128-255 using FNC4
    Capacity
    Variable. GS1-128 allows up to 48 characters, including Application Identifiers and separator characters.
    Typical use
    Shipping labels (GS1-128), warehouse inventory, automotive parts, patient labels
  • DataBar 1D, with stacked versions

    A compact GS1 family for fresh produce, variable-weight items, coupons and small retail items.

    Specs
    Data
    Digits (the GTIN). Expanded versions carry GS1 Application Identifier data.
    Capacity
    A 14-digit GTIN. Expanded: up to 74 digits or 41 alphanumeric characters.
    Typical use
    Fresh produce, variable-weight items, coupons
  • EAN/UPC Code 1D

    The barcodes on retail goods. They carry the product GTIN and are scanned at the point of sale, in inventory counts and in warehousing.

    Specs
    Data
    Digits only
    Capacity
    EAN-13: 13 digits; UPC-A: 12; EAN-8: 8, including check digits. UPC-E represents an eligible UPC-A number in zero-suppressed form.
    Typical use
    Retail point of sale, inventory, books and periodicals
  • GS1 Composite 1D linear plus a 2D component

    A linear barcode with a 2D component printed above it, adding batch, expiry or serial data next to the GTIN.

    Specs
    Data
    GS1 Application Identifier data
    Capacity
    2D component: up to 56 (CC-A), 338 (CC-B) or 2,361 (CC-C) digits. CC-C requires a GS1-128 linear component.
    Typical use
    Batch, expiry or serial data next to a GTIN on healthcare and logistics labels
  • MSI Plessey 1D

    Used to mark shelves, bins and storage containers, mostly in inventory and warehousing.

    Specs
    Data
    Digits only
    Capacity
    Variable, set by the application
    Typical use
    Warehouse shelf and bin labels, inventory control
  • Postal Barcodes Postal: 4-state (POSTNET and PLANET: 2-state)

    Used by postal services to automate mail sorting and tracking, encoding routing and delivery information.

    Specs
    Data
    Digits for USPS; letters and digits for Royal Mail and KIX; Australia Post customer-information fields also take upper and lower case letters, digits, space and #
    Capacity
    Varies by format. USPS Intelligent Mail: 20, 25, 29 or 31 digits.
    Typical use
    Automated mail sorting, delivery point routing, mail tracking
  • Telepen 1D

    Used mainly by UK university and public libraries, and in the motor industry.

    Specs
    Data
    All 128 ASCII characters, with a numeric mode
    Capacity
    Variable, limited by available label width and application requirements
    Typical use
    UK university and public libraries, the motor industry
6

Two-dimensional (or 2D) Barcodes

Matrix and stacked 2D codes that hold data in both directions.

  • Aztec 2D matrix

    A 2D code with a bullseye at its center and no quiet zone. Used on airline boarding passes, rail and event tickets and in patient identification.

    Specs
    Data
    Text and binary data; all 256 byte values. Supports ECI.
    Capacity
    Up to 3,832 digits, 3,067 letters or 1,914 bytes
    Typical use
    Airline boarding passes, rail and event tickets
  • Data Matrix 2D matrix

    A small square or rectangular 2D code, the standard for direct part marking. Widely used on medicine packs, electronics, aerospace and automotive parts.

    Specs
    Data
    Numeric, alphanumeric and bytes. GS1 data through FNC1.
    Capacity
    Up to 3,116 digits, 2,335 alphanumeric characters or 1,555 bytes
    Typical use
    Medicine packs, direct part marking, electronics and automotive parts
  • DotCode 2D matrix (dots)

    A 2D code of separate dots, printed at high speed on cigarette packs, beverage lines and shipping labels.

    Specs
    Data
    ASCII, extended ASCII and binary. GS1 data.
    Capacity
    No fixed maximum. The encoder sets the rows and columns.
    Typical use
    Cigarette and tobacco packs, high-speed beverage lines
  • MaxiCode 2D matrix (fixed size)

    A fixed-size 2D code with a central bullseye, developed by UPS for package labels, parcel sorting and tracking.

    Specs
    Data
    All 256 byte values
    Capacity
    Mode 4: up to 93 uppercase letters or 138 digits; capacity varies by mode and content
    Typical use
    UPS package labels, parcel sorting
  • PDF417 Stacked 2D

    A stacked 2D code found on driver's licenses and ID cards, printed airline boarding passes and shipping labels.

    Specs
    Data
    Text (printable ASCII), bytes and digits
    Capacity
    Up to 2,710 digits, 1,850 text characters or 1,108 bytes
    Typical use
    Driver's licenses and ID cards, boarding passes, shipping labels
  • QR Code 2D matrix

    The 2D code phones made popular: links on packaging, mobile payments, tickets, loyalty programs and menus.

    Specs
    Data
    Numeric, alphanumeric, bytes and Kanji. GS1 data through FNC1.
    Capacity
    Up to 7,089 digits, 4,296 alphanumeric characters or 2,953 bytes: maximums for Model 2, Version 40, error correction level L. Alphanumeric is QR's restricted character set; lowercase letters need another mode.
    Typical use
    Links on packaging, mobile payments, tickets, menus

Capacities are maximums under suitable encoding conditions, not guaranteed capacities for arbitrary text. Actual capacity depends on the symbology, symbol size, encoding mode, error correction and application rules. Byte counts are not necessarily character counts.

Scanning all of them with barKoder

The barKoder Barcode Scanner SDK reads 1D and 2D barcode formats with the camera of the phones, tablets and browsers your app already runs on. It supports Android 5.0 (API 21) and above, iOS 15 and above, all major web browsers, and Flutter, React Native, .NET MAUI, Capacitor, Cordova and NativeScript apps. These features cover the hardest cases across barcode types.

MatrixSight® for damaged 2D codes

Reads damaged Data Matrix, QR Code and Micro QR codes, including QR codes missing all three finder patterns and Data Matrix codes with missing rows or columns.

MatrixSight® algorithm →

DPM mode for marked parts

Reads Data Matrix and QR codes marked directly on metal, plastic and electronic components by laser marking, dot peen or engraving, on the phones and industrial mobile computers your teams already carry.

DPM Barcode Scanner SDK →

Batch MultiScan for mixed barcodes

Decodes several barcodes in one camera view, whatever their type or size: 1D codes and QR codes, in a neat grid or scattered, from a few to dozens per image.

Batch MultiScan →

GS1 parser for GS1 data

Turns raw GS1 barcode strings into labeled fields such as GTIN, batch or lot, expiry date, serial number and SSCC, and recognizes the symbology automatically, whether it is a DataMatrix, a QR code or a 1D barcode.

GS1 Barcode Parser →

Try barKoder on your phone or in your browser

Install the free barKoder demo app, or open the web demo, and scan your own barcodes before you integrate the SDK.

iPhone and iPad

barKoder demo app for iOS

Scan with your camera, or point it at the QR code to open the App Store.

Download on the App Store
QR code linking to the barKoder demo app on the App Store

Android phones and tablets

barKoder demo app for Android

Scan with your camera, or point it at the QR code to open Google Play.

Get it on Google Play
QR code linking to the barKoder demo app on Google Play

Any modern browser

barKoder web demo

Runs the Web SDK in your browser, on desktop or mobile, with nothing to install.

Open the web demo
QR code linking to the barKoder web demo

Test with known samples. Print or display the testing sheet and scan each 1D and 2D barcode with the demo app. The data sheet summarizes the SDK for your team.

Barcode types questions

What are the main types of barcodes?

There are four main groups. 1D or linear barcodes, such as EAN/UPC, Code 128 and Code 39, hold data in the widths of bars and spaces. Stacked barcodes, such as PDF417, pile several linear rows into one symbol. 2D matrix codes, such as QR Code, Data Matrix, Aztec, DotCode and MaxiCode, hold data in a grid of modules or dots. Postal barcodes hold data in the height of each bar. Within each group there are many symbologies, each with its own character set, capacity and standard.

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

A 1D barcode stores data in one direction, in the widths of its bars and spaces, so it holds a short number or ID and grows longer as you add data. A 2D code stores data in both directions, so it holds far more in a small area: a QR Code holds up to 4,296 alphanumeric characters and a Data Matrix up to 2,335. Most 2D codes also carry error correction, such as Reed-Solomon in QR Code and Data Matrix, so a reader can still decode a symbol that is partly damaged. Phone and tablet cameras read both kinds.

Which barcode type should I use?

Start from where the code goes and who scans it. Retail products sold at a till use EAN or UPC with a GS1 GTIN. Cases and cartons use ITF-14, and logistics labels use GS1-128, a form of Code 128. Small items, medicine packs and parts marked by laser or dot peen use Data Matrix. Codes that consumers scan with a phone, such as links and payments, use QR Code. Driver's licenses and ID cards use PDF417, and many boarding passes and tickets use Aztec. For internal labels in a closed system, Code 128 or Code 39 is usually enough.

What are continuous and discrete symbologies?

In a discrete symbology, each character stands on its own and the gap between characters carries no data. Codabar, Code 11 and Code 39 are discrete. In a continuous symbology, characters run into each other with no gap, which makes the code denser. Code 128, EAN/UPC, MSI Plessey and Telepen are continuous. The difference matters to people who print and verify barcodes. A scanner that supports the symbology reads both kinds.

Which barcode reader supports 1D and 2D formats in a single API?

The barKoder Barcode Scanner SDK reads 1D, stacked, 2D and postal barcodes through one API on Android, iOS, the web and cross-platform frameworks. You enable the decoders your app needs, and Batch MultiScan can read 1D barcodes and QR codes of different sizes in the same camera view. Try your own barcodes in the web demo, or start a free trial that runs for 30 days on up to 25 devices.

Add 1D and 2D barcode scanning to your app

Test the SDK on your own labels, packs and parts with a free 30-day trial, or talk to an SDK expert about the barcode types your project needs.