Get Started With The Parser#

The parser parses data strings, e.g. as found in barcodes, into a set of key-value mappings. These data formats are supported: Health Industry Bar Code (HIBC), GS1 Application Identifier (parser/AI) system, AAMVA Driver License/Identification, ICAO Machine Readable Travel Document (parser/MRTD) and Swiss QR Codes, VIN Vehicle Identification Number.

More data formats will be added in future releases. Please contact us if the data format you are using is not yet supported, or you want to use the parser on a currently unsupported platform.


Before starting with adding a capture mode, make sure that you have a valid Scandit Data Capture SDK license key and that you added the necessary dependencies. If you have not done that yet, check out this guide.


You can retrieve your Scandit Data Capture SDK license key, by signing in to your account at

First of all, include the ScanditParser library and its dependencies to your project, if any.

Internal dependencies#

Some of the Scandit Data Capture SDK modules depend on others to work. Below is a list of these interdependencies.




No dependencies


  • ScanditCaptureCore


  • ScanditCaptureCore


  • ScanditCaptureCore


  • ScanditCaptureCore

  • ScanditTextCapture

Create the Data Capture Context#

The first step to add barcode capture capabilities to your application is to create a new data capture context. The context expects a valid Scandit Data Capture SDK license key during construction.

const context = Scandit.DataCaptureContext.forLicenseKey("-- ENTER YOUR SCANDIT LICENSE KEY HERE --");

Use the Parser#

In a nutshell, the parser provides functionality to transform a data string and into a list of key-value pairs. To use this functionality in your app, first the parser must be instantiated with the desired format. The result is then returned in a result object. The following sample shows how the parser code typically looks like.

const parser = Scandit.Parser.forContextAndFormat(dataCaptureContext, Scandit.ParserDataFormat.GS1AI);

parser.parseString('1719060110SCANDIT123').then(result => {
  // We can either access the data from the raw JSON string ...

  // ... or from the fields dictionary ...
  const fields = result.fieldsByName;
  const field = fields['17'];

  // parsed can be an object, array, string or number
  const parsed = field.parsed;

  // ... or from the fields array
  result.fields.forEach(field => {
    console.log(`${}: ${field.parsed}`);
}).catch(error => {
  // Something went wrong. Look at error for more info.

For details, go to the API docs.