Barcode Symbologies

In this guide, you will learn about barcode symbologies and their use cases.

Before you start…

To get the most out of this guide, we recommend that you first take a look at the following guides:

Supported Symbologies

Retail 1D Symbologies

European Article Number (EAN)

  • Also known as Japanese Article Number (JAN).

  • Encodes a Global Trade Identification Number (GTIN).

  • Contains 8 (EAN-8) or 13 (EAN-13) numerical digits.

  • Last digit serves as a mod10 checksum.

  • Additional data can be stored in an EAN-2 or EAN-5 add-on code.

  • It has been standardised under ISO/IEC 15420.

  • Relevant enum values: Symbology.ean8, Symbology.ean13Upca.

_images/ean13.png

Universal Product Code (UPC)

  • Encodes a Global Trade Identification Number (GTIN).

  • Contains 6 (UPC-E) or 12 (UPC-A) numerical digits.

  • Last digit serves as a mod10 checksum.

  • Additional data can be stored in an EAN-2 or EAN-5 add-on code.

  • It has been standardised under ISO/IEC 15420.

  • Encodes a Global Trade Identification Number (GTIN).

  • Relevant enum values: Symbology.upce, Symbology.ean13Upca.

_images/upca.png

EAN-2 / EAN-5 Add-On

  • Encode additional product data like issue number, date or price.

  • Can only be used in combination with an EAN-8, EAN-13, UPC-A or UPC-E code.

  • EAN-2 encodes two digits, EAN-5 encodes five digits.

  • Additional information can be found on the Scan Add-On/Extension Codes.

_images/ean13_with_addon2.png

GS1 DataBar

  • Used to encode a Global Trade Identification Numbers (GTIN) along with variable additional information defined by application identifiers (AI). Examples are price, weight or expiry date.

  • Valid application identifiers (AI) are defined in the GS1 specification.

  • Supports variable length data content.

  • Barcode data is verified by an implicit checksum.

  • Does not require quiet zones around the barcode.

  • It has been standardised under ISO/IEC 24724.

  • Relevant enum value: Symbology.gs1Databar, Symbology.gs1DatabarExpanded, Symbology.gs1DatabarLimited.

_images/gs1databar_expanded_stacked.png

Industrial 1D Symbologies

Code 128

  • Used in a wide range of applications.

  • The barcode data can be encode numerical data only, two different subsets of the ASCII table or Latin-1 (ISO-8859-1) data. Combinations of the four different modes can be used in a single code.

  • Supports variable length data content.

  • A mandatory checksum is verified.

  • It has been standardised under ISO/IEC 15417.

  • Includes support for EAN-128 and GS1-128.

  • Relevant enum value: Symbology.code128.

_images/code128.png

Code 32

  • It is used for labelling pharmaceutical products in Italy.

  • Also known as Italian Pharmacode, IMH, Codice 32 Pharmacode, Codice Farmaceutico Italiano and Radix 32.

  • Contains nine numerical digits.

  • Last digit serves as a mandatory checksum.

  • Narrow to wide bar ratios of 1:2.5 is recommended.

  • Specification can be found in Allegato A Caratteristiche tecniche del bollino farmaceutico from 18-7-2014 GAZZETTA UFFICIALE DELLA REPUBBLICA ITALIANA Serie generale - n. 165

  • Please note that Code 32 codes can be scanned as valid Code 39 codes and vice versa. Code 32 is a subset of the Code 39 symbology (and therefore indistinguishable).

  • Relevant enum value: Symbology.code32.

_images/code32.png

Code 39

  • Mostly used in logistics to encode application specific identifiers.

  • The standard version can encode numbers 0-9, capital letters A-Z, symbols -.$/+% and space.

  • Supports variable length data content.

  • Narrow to wide bar ratios from 1:2 up to 1:3 are supported. 1:2.5 is recommended.

  • By default no checksum is verified, but an optional mod43 checksum can be enforced.

  • All ASCII characters including control characters encoding support can be enabled on demand.

  • It has been standardised under ISO/IEC 16388.

  • Please note that Code 39 codes can be scanned as valid Code 32 codes and vice versa. Code 32 is a subset of the Code 39 symbology (and therefore indistinguishable).

  • Relevant enum value: Symbology.code39.

_images/code39.png

Code 93

  • Mostly used in logistics to encode application specific identifiers.

  • Data in standard encoding (numbers 0-9, capital letters A-Z, symbols -.$/+% and space) and Full ASCII mode (including control characters) are supported.

  • Supports variable length data content.

  • Two mod47 checksums are verified.

  • Relevant enum value: Symbology.code93.

_images/code93.png

ITF (Interleaved 2 of 5)

  • It is used primarily in the distribution and warehouse industry.

  • Encodes an even number of numerical characters.

  • Supports variable length data content.

  • Narrow to wide bar ratios from 1:2 up to 1:3 are supported. 1:2.5 is recommended.

  • By default no checksum is verified.

  • It has been standardised under ISO/IEC 16390.

  • An optional mod10 checksum can be enforced.

  • Alternative names for this symbology include Leitcode, or Identcode. Both of these have a mandatory mod10 checksum.

  • Relevant enum value: Symbology.interleavedTwoOfFive.

_images/itf.png

Codabar

  • This symbology is used by U.S. blood banks, photo labs, libraries, on FedEx airbills and in Japanese Logistics (where it is known as NW-7).

  • Encodes numbers and the characters –$:/.+

  • First and last symbols (the guard patterns) are one of A, B, C, or D. They are returned as part of the data string.

  • Supports variable length data content.

  • Some standards that use Codabar will define a check digit, but there is no agreed-upon standard checksum algorithm.

  • The width ratio between narrow and wide can be chosen between 1:2.25 and 1:3.

  • Different checksum algorithms are in use, though they are not standardized. Supported optional checksums are a mod11 and mod16 checksum.

  • Relevant enum value: Symbology.codabar.

_images/codabar.png

Legacy 1D Symbologies

Code 11

  • Primarily used for labelling telecommunication equipment. Also known as USD-8.

  • The barcode data can be encode numerical data, the dash and dot character.

  • Supports variable length data content.

  • For up to 10 data digits a single check digit is used, otherwise two check digits are used.

  • Relevant enum value: Symbology.code11.

_images/code11.png

Code 25

  • Also known as Standard 2 of 5, Industrial 2 of 5 or Discrete 2 of 5.

  • Legacy numerical barcode format with a low data density.

  • Supports variable length data content.

  • By default no checksum is verified.

  • An optional mod10 checksum can be enforced.

  • Relevant enum value: Symbology.code25.

_images/code25.png

IATA 2 of 5

  • Also known as Computer Identics 2 of 5.

  • Used by International Air Transport Association (IATA) for managing air cargo.

  • Supports variable length data content.

  • By default no checksum is verified.

  • An optional mod1010 checksum can be enforced.

  • Relevant enum value: Symbology.iataTwoOfFive.

_images/iata2of5.png

Matrix 2 of 5

  • From the same family as Code 25 and IATA 2 of 5

  • ~30% more dense than Code 25 or IATA 2 of 5

  • Supports variable length data content.

  • Encoding uses variable width spaces as well as bars

  • Stores numerical [0-9] data only

  • An optional mod10 checksum can be enforced.

  • Relevant enum value: Symbology.matrixTwoOfFive.

_images/matrix2of5.png

MSI Plessey

  • MSI is used primarily for inventory control, marking storage containers and shelves in warehouse environments.

  • Encodes any number of numerical characters.

  • By default a mod10 checksum is verified. Alternative supported checksum options are mod11, mod1010 and mod1110.

  • MSI is used primarily for inventory control, marking storage containers and shelves in warehouse environments.

  • Encodes any number of numerical characters.

  • Relevant enum value: Symbology.msiPlessey.

_images/msi.png

2D Symbologies

QR Code

  • Supports variable length data content.

  • Data encoding modes support numeric, alphanumeric, binary data and kanji characters.

  • Different sizes (called versions) and error correction levels can be defined.

  • The Scandit Data Capture SDK supports Model 2 codes including color inversion, mirroring and GS1 data content.

  • It has been standardised under ISO/IEC 18004.

  • Relevant enum value: Symbology.qr.

_images/qr.png

Micro QR Code

  • Miniature version of the standard QR code that supports variable length data content up to 35 characters

  • Different error correction levels can be defined with a data recovery rate of up to 25%

  • Optimized to transfer small amounts of data such as a phone number or a website URL

  • The Scandit Data Capture SDK supports color inversion and mirroring

  • Relevant enum value: Symbology.microQr.

_images/microqr.png

Rectangular Micro QR Code (rMQR)

  • Rectangular version of Micro QR code (described in ISO/IEC 23941), supports variable length data content up to 361 numbers, 219 alphanumeric characters, 150 byte, 92 Kanji.

  • Two different error correction levels can be defined with a data recovery rate of up to 30%.

  • 32 Different sizes, from 7x43 to 17x139.

  • Relevant enum value: Symbology.microQr.

_images/rMQR.png

Data Matrix

  • Supports variable length data content.

  • Encodings and sizes defined in the Data Matrix ECC 200 standard are supported.

  • Different error correction levels can be defined.

  • It has been standardised under ISO/IEC 16022.

  • Relevant enum value: Symbology.dataMatrix.

_images/datamatrix.png

Data Matrix Rectangular Extension (DMRE)

  • The decoder supports the Data Matrix Rectangular Extension (DMRE) as defined in the AIM-D Symbology Specification Revision 1.01.

  • Includes support for GS1 encoded data (GS1 Data Matrix).

  • Relevant enum values: Symbology.dataMatrix.

_images/dmre.png

Data Matrix Direct Part Marking (DPM)

  • Data Matrix codes are frequently used for direct part marking (DPM) where the codes are edged directly into the material instead of being printed.

  • Includes support for GS1 encoded data (GS1 Data Matrix).

  • For scanning these types of codes, it is recommended to enable the direct_part_marking extension_mode.

  • Relevant enum values: Symbology.dataMatrix.

_images/dpm.png

PDF417

  • Used in a wide range of applications such as transport tickets and document processing.

  • Supports variable length data content.

  • The number of rows and columns are configurable.

  • Different error correction levels can be defined.

  • It has been standardised under ISO/IEC 15438.

  • Truncated PDF417 (Compact PDF417) codes can be used to save space.

  • Relevant enum value: Symbology.pdf417.

_images/pdf417.png

MicroPDF417

  • More space efficient version of PDF417 without start and end patterns.

  • Used in GS1 Composite Codes type A (CC-A) and B (CC-B).

  • Supports variable length data content using one to four columns and up to 44 rows.

  • All size versions have a fixed error correction level.

  • It has been standardised under ISO/IEC 24728.

  • Relevant enum value: Symbology.microPdf417.

_images/micropdf417.png

Aztec Code

  • Used for tickets in the transport industries, e.g. railway companies.

  • Data can be encoded in ASCII or extended ASCII.

  • Supports variable length data content.

  • Different error correction levels can be defined.

  • It has been standardised under ISO/IEC 24778.

  • Relevant enum value: Symbology.aztec.

_images/aztec.png

MaxiCode

  • Fixed size 2d symbology originally created by UPS in 1992.

  • Used for tracking and managing shipments of packages.

  • It has been standardised under ISO/IEC 16023.

  • Supports encoding of a Structured Carrier Message or data in extended ASCII.

  • Uses Reed-Solomon error correction.

  • Fixed size 2d symbology originally created by UPS in 1992.

  • Relevant enum value: Symbology.maxiCode.

_images/maxicode.png

GS1 DotCode

  • Public Domain optical data carrier designed to be printed reliably at very high speed.

  • Flexible code shape: rectangular codes of virtually any size and width/height proportion can be used.

  • Strong error correction by using message encoding inspired by Code 128 and strengthened by Reed-Solomon.

  • Allows to apply real time data with GS1 application identifiers, such as expiration date, lot number and serial number to products at production line speeds.

  • It has been standardised in the AIM specification AIMD013 Revision 3.0.

  • Relevant enum value: Symbology.dotCode.

_images/dotcode.png

ArUco

  • Used mainly for camera pose estimation in augmented reality and robotics, developed at the University of Cordoba.

  • Consists of an n x n bit matrix (n can be any integer value, most commonly used are values ranging from 4 to 7) and a one element wide black border.

  • Does not store any data directly, the bit matrix uniquely identifies the marker in a dictionary (collection of markers of the same bit matrix size).

  • Requires a dictionary, it can be computed or an available preset can be used.

  • Relevant enum value: Symbology.arUco.

_images/aruco.png

GS1 Composite Codes

GS1 Composite Codes as defined in ISO/IEC 24723:2010 are made up of a 1D and 2D code. For technical details see our guide for scanning composite codes.

GS1 Composite Code A (CC-A)

  • Extends a linear GS1 barcode using an additional MicroPDF417 code.

  • Optimized to use as little space as possible.

  • Only a special set of MicroPDF417 column, row and error correction level combinations can be used.

  • Data is encoded in a special base 928 compaction mode.

  • Three column version has no left row address patterns.

_images/composite_type_a.png

GS1 Composite Code B (CC-B)

  • Extends a linear GS1 barcode using an additional MicroPDF417 code.

  • A subset of the MicroPDF417 column and row combinations can be used.

  • Marked by the (Micro)PDF417 symbol 920 at the first position.

  • (Micro)PDF417 data is encoded in byte compaction mode.

_images/composite_type_b.png

GS1 Composite Code C (CC-C)

  • Extends a GS1-128 (Code 128) barcode using an additional PDF417 code.

  • Same encoding as CC-B.

_images/composite_type_c.png

Postal Code Symbologies

RM4SCC (Royal Mail 4 State Customer Code)

  • Postal code symbology used by Royal Mail and Singapore Post for encoding the destination address.

  • It enables UK postcodes as well as Delivery Point Suffixes (DPSs) to be easily read by a machine at high speed.

  • Uses a checksum digit for verifying data.

  • Relevant enum value: Symbology.rm4scc

_images/rm4scc.png

KIX (Klant Index)

  • Uses the same symbol alphabet as RM4SCC.

  • Does not use a checksum for data verification, nor does it have a start/end pattern.

  • KIX codes can be read from left-to-right or right-to-left. Depending on the reading direction, the data is completely different. To determine which of the two orientations is correct, the Scandit Data Capture SDK matches the data against a set of encoding rules and returns the data that matches the rule.

  • Relevant enum value: Symbology.kix

_images/kix.png

Posi LAPA 4 State Code

  • Uses the same symbol alphabet as RM4SCC

  • Uses Reed-Solomon error correction. It can correct up to 8 erasures or 4 errors.

  • LAPA can be read from left-to-right or right-to-left. The direction can be determined by reading the leftmost or the rightmost bar.

  • Thanks to its fixed length and error correction, it offers better robustness than RM4SCC.

  • Relevant enum value: Symbology.lapa4sc

_images/posi_lapa_4state.png

USPS Intelligent Mail

  • Postal code symbology used by the United States Postal Service (USPS) to sort and track letters and flats.

  • Height-modulated barcode with 4-state symbology.

  • Combines and improves functionalities of the POSTNET and PLANET Code symbologies.

  • Uses an eleven-bit cyclic redundancy check to detect, but not correct, errors.

  • Relevant enum value: Symbology.uspsIntelligentMail

_images/usps_intelligent_mail.png

UPU (Universal Postage Union) S18 4-State

  • UPU 4-state is a variable-length and alphanumeric barcode.

  • It is used to add identifier tags to UPU postal items.

  • It has two possible encoding formats, 18C and 18D.

  • It can encode 19 or 25 codeword with up to 6 or 12 error correction codewords respectively.

  • It uses a Reed-Solomon error detection and correction scheme.

  • The Universal Postage Union manages the UPU S18 4-State specification.

  • Relevant enum value: Symbology.upu4State

_images/UPU_S18.png

Australian Postal Code (Australia Post)

  • This symbology is used by Australia Post for Postal code and automatic mail sorting.

  • It has a variable length of 37 to 67 bars, and is height-modulated and 4-state.

  • Part of the barcode is customer-defined; the person who prints it out can decide what to put there.

  • The barcode is protected by the Reed-Solomon error correcting system.

  • Relevant enum value: Symbology.australianPost

_images/australian_postal_code.png

Symbologies details

GS1 Data Carriers

The GS1 organisation defined a standard to encode application specific data in a barcode. The symbologies Code128, GS1 DataBar, DataMatrix and QR codes can contain GS1 encoded data. The barcode property Barcode.isGS1DataCarrier tells you if a barcode contains GS1 encoded data. GS1 data has to be accessed using Barcode.rawData and not Barcode.data because it is stored in machine readable form and might contain non-printable characters such as group separators (ASCII 29).

GS1 encoded data cannot be displayed directly to the user. The application identifiers cannot be distinguished from the data and non-printable characters might be part of the data. There are three different options to process the data. Use the Scandit parser API to convert the machine readable data into a human readable string, use the Scandit parser to extract all data elements (Application Identifiers) from the machine readable data or lastly use your own parser to transform the machine readable data.

Example of a correctly encoded GS1 Code128 (also known as GS1-128) barcode:

_images/gs1_code128.png

The machine readable data that gets scanned from the code above, where <GS> represents the non-printable group separator character:

1088748816455721123456789012<GS>11111228

The same data in the human readable representation:

(10)887488164557(21)123456789012(11)111228

The same data parsed into its application identifiers by the Scandit parser:

[
    {
        "name" : "01",
        "parsed" : {
            "indicator" : 1,
            "company_prefix" : "0887488",
            "item_reference" : "16455"
        },
        "rawString" : "10887488164557"
    },
    {
        "name" : "21",
        "parsed" : "123456789012",
        "rawString" : "123456789012"
    },
    {
        "name" : "11",
        "parsed" : {
            "year" : 2011,
            "month" : 12,
            "day" : 28
        },
        "rawString" : "111228"
    }
]

Symbology Specific Notes

  • Code128 uses a leading FNC1 character (ASCII 21) to signal GS1 data. The FNC1 character is encoded but will not be returned in the barcode result.

  • GS1 DataBar always contains GS1 data.

  • DataMatrix and QR Code use an internal symbology specific FNC1 symbol to signal GS1 data carrier mode. The internal symbol is not returned as part of the result. The common mistake of adding a leading group separator character in raw byte mode does not turn the code into a GS1 data carrier.

There are many incorrectly encoded GS1 codes in the wild. The following image depicts two common error cases: The first incorrect code uses a leading group separator instead of the DataMatrix specific encoding scheme. The second error case encodes the human readable GS1 data representation in a normal DataMatrix code.

_images/gs1_data_matrix_examples.png

What’s next?

To dive further into the Scandit Data Capture SDK we recommend the following articles: