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.
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.
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.
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.
| Barcode type | Dimension | Data type | Capacity | Typical use |
|---|---|---|---|---|
| Codabar | 1D | Digits 0-9 and - $ : / . +, with A, B, C or D as start and stop | Variable, set by the application | Library books and cards, blood bank labels, airbills |
| Code 11 | 1D | Digits 0-9 and the dash | Variable, no fixed maximum | Telecommunications equipment labels |
| Code 25 (2 of 5) | 1D | Digits only | Variable. ITF-14 is fixed at 14 digits. | Cases, cartons and pallets (ITF-14), warehousing, air cargo |
| Code 32 | 1D | Digits only (the AIC number) | Fixed: one 9-digit AIC number | Medicine packs sold in Italy |
| Code 39 | 1D | 43 characters: A-Z, 0-9, space and - . $ / + %. Full ASCII mode encodes all 128 ASCII characters. | Variable, limited by the label width | VINs and automotive parts, defense logistics, manufacturing and healthcare labels |
| Code 93 | 1D | 47 characters, including four shift characters for full ASCII | Variable | Logistics and postal labels, retail inventory, industrial labels |
| Code 128 | 1D | All 128 ASCII characters plus byte values 128-255 | Variable. GS1-128 allows up to 48 data characters. | Shipping labels (GS1-128), warehouse inventory, automotive parts, patient labels |
| MSI Plessey | 1D | Digits only | Variable, set by the application | Warehouse shelf and bin labels, inventory control |
| Telepen | 1D | All 128 ASCII characters, with a numeric mode | Variable. Up to 8 ASCII characters or 16 digits per inch. | UK university and public libraries, the motor industry |
| EAN/UPC | 1D | Digits only | Fixed: 13 digits (EAN-13), 12 (UPC-A) or 8 (EAN-8) | Retail point of sale, inventory, books and periodicals |
| GS1 DataBar | 1D, with stacked versions | Digits (the GTIN). Expanded versions carry GS1 Application Identifier data. | A 14-digit GTIN. Expanded: up to 74 digits or 41 letters. | Fresh produce, variable-weight items, coupons |
| GS1 Composite | 1D linear plus a 2D component | GS1 Application Identifier data | 2D component: up to 56 (CC-A), 338 (CC-B) or 2,361 (CC-C) digits | Batch, expiry or serial data next to a GTIN on healthcare and logistics labels |
| Postal barcodes | Postal: 4-state (POSTNET and PLANET: 2-state) | Digits for USPS and Australia Post, letters and digits for Royal Mail and KIX | Fixed per format. Intelligent Mail: 31 digits. | Automated mail sorting, delivery point routing, mail tracking |
| Data Matrix | 2D matrix | Numeric, alphanumeric and bytes. GS1 data through FNC1. | Up to 3,116 digits, 2,335 alphanumeric characters or 1,555 bytes | Medicine packs, direct part marking, electronics and automotive parts |
| QR Code | 2D matrix | Numeric, alphanumeric, bytes and Kanji. GS1 data through FNC1. | Up to 7,089 digits, 4,296 alphanumeric characters or 2,953 bytes | Links on packaging, mobile payments, tickets, menus |
| Aztec | 2D matrix | All 256 byte values. GS1 data through FNC1. | Up to 3,832 digits, 3,067 letters or 1,914 bytes | Airline boarding passes, rail and event tickets |
| PDF417 | Stacked 2D | Text (printable ASCII), bytes and digits | Up to 2,710 digits, 1,850 text characters or 1,108 bytes | Driver's licenses and ID cards, boarding passes, shipping labels |
| DotCode | 2D matrix (dots) | ASCII, extended ASCII and binary. GS1 data. | No fixed maximum. The encoder sets the rows and columns. | Cigarette and tobacco packs, high-speed beverage lines |
| MaxiCode | 2D matrix (fixed size) | All 256 byte values | Up to 93 alphanumeric characters or 138 digits | UPS package labels, parcel sorting |
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.
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 →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 →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 →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 →Install the free barKoder demo app, or open the web demo, and scan your own barcodes before you integrate the SDK.
iPhone and iPad
Scan with your camera, or point it at the QR code to open the App Store.
Android phones and tablets
Scan with your camera, or point it at the QR code to open Google Play.
Any modern browser
Runs the Web SDK in your browser, on desktop or mobile, with nothing to install.
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.
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.
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.
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.
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.
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.
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.