GS1 Parser

GS1 Barcode Parser SDK

Scan GS1 DataMatrix, GS1-128, GS1 QR, DataBar and Composite codes and get labeled fields back: GTIN, batch or lot, expiry date, serial number and more. The GS1 parser splits the Application Identifiers for you, on the device, in native, web and cross-platform apps.

barKoder and GS1 logos joined as puzzle pieces, illustrating the GS1 parser

From GS1 barcode to labeled fields

Decoding tells you what data a symbol holds. Parsing tells you what each part of that data means. A GS1 barcode packs several Application Identifiers (AIs) into one string, so your app needs both steps. barKoder does both on the device.

  1. Scan The user points the device camera at a GS1 DataMatrix, GS1-128, GS1 QR, DataBar or Composite code.
  2. Decode The barKoder engine reads the symbol and flags whether the result is GS1 compliant.
  3. Parse The GS1 parser recognizes each Application Identifier, handles fixed- and variable-length fields and splits the string.
  4. Use Your app receives labeled fields such as GTIN, batch, expiry and serial number, with no manual string splitting or lookup.

What is inside a GS1 barcode?

GS1 is the global standard for product identification and supply chain labeling. Its barcodes are used on over 1 billion products worldwide. They encode product identifiers (GTIN), expiry dates, batch and lot numbers, serial numbers, quantity, weight and volume, healthcare IDs such as GSRN and GDTI, and shipment and location data such as SSCC and GLN.

Each value is tagged with an Application Identifier, the short number that tells software what follows it. Your app receives them run together in one string. A GTIN and an expiry date always have the same length, so nothing marks where they end. Batch and serial numbers vary in length, so an ASCII 29 group separator closes any variable-length field that isn't last.

Code that splits the string at fixed positions breaks on the first label that differs from the sample. A GS1 parser reads the AIs and their rules instead. See a worked example in what a medicine barcode holds and how to parse it.

Common GS1 Application Identifiers
AI Data element Good to know
01 GTIN 14 digits. The last digit is a check digit.
17 Expiry date Six digits, YYMMDD. 280331 is 31 March 2028.
10 Batch or lot number Variable length
21 Serial number Variable length, unique per item
414 GLN of a physical location A warehouse, dock door or storage location
8003 GRAI Returnable assets such as pallets, crates and containers
8004 GIAI Individual assets such as equipment and tools

GS1 DataMatrix, GS1-128 and the other GS1 carriers

The same GS1 data can travel in several barcode types. The parser recognizes GS1 data in 2D and 1D symbologies, so one integration covers all of them.

GS1 DataMatrix

Data Matrix with FNC1 and GS1 Application Identifiers. Compact and dense, it is the standard on medicine packs, where it carries GTIN, expiry, batch and serial number.

Data Matrix scanning

GS1-128

Code 128 with a leading FNC1 and Application Identifiers, used on logistics and shipping labels for batch numbers, expiry dates and container codes.

Code 128 and GS1-128 scanning

GS1 QR Code

A QR code with GS1-structured data. barKoder supports FNC1 for GS1 QR Codes in supply chain applications.

QR Code scanning

GS1 Digital Link

A web address built from AIs, such as /01/ for the GTIN and /10/ for the batch, inside a QR code or GS1 DataMatrix. The SDK reads these codes and returns the web address. The GS1 parser works on FNC1 element strings, so it does not split Digital Link addresses into AIs yet.

GS1 Digital Link explained

GS1 DataBar

All seven variants, from Omnidirectional and Limited to Expanded Stacked. DataBar Expanded encodes several AI elements such as weight, date and serial number.

GS1 DataBar scanning

GS1 Composite

A linear symbol (GS1-128, EAN/UPC or DataBar) with a CC-A, CC-B or CC-C component above it. The parser decodes AIs from both the linear and the 2D part.

GS1 Composite scanning

What the GS1 parser does, and what your app still checks

barKoder's GS1 parser turns raw GS1 strings into clearly labeled, machine-usable fields. Plan your validation around it.

Parser features

  • Compliant with GS1 General Specifications v24
  • Recognizes GS1 data in Data Matrix, QR and 1D symbologies
  • Supports fixed- and variable-length AIs
  • Structured output, with no manual string splitting or lookup
  • Cross-platform: use it in mobile, web or embedded systems
  • Real-time decoding, including bulk and batch scans

Checks to add in your app

  • Verify the GTIN check digit before accepting a scan
  • Compare the expiry date with today and warn on expired items
  • Match the identifier type your workflow expects: GTIN, SSCC, GIAI or GRAI
  • Offer manual entry of the printed values for codes that won't scan
  • Keep scanning and reporting to traceability systems in separate layers

Parse GS1 Application Identifiers in your app

Enable the decoders for the GS1 symbols you scan, set the formatting to GS1 and read the parsed result. The formatting option is documented for Android, iOS, the Web SDK, Flutter, React Native, .NET MAUI, Capacitor, Cordova, NativeScript and Python.

Set the formatting type to GS1:

Dart
              FormattingType type = FormattingType.gs1;
              _barkoder.setFormattingType(type);
              print('Formatting type set to:$type');
            

Native SDKs expose the same option as formattingType on Android and formatting on iOS, with GS1 among the modes. Automatic detects whether a result is parsable and applies the matching parser.

Enable the decoders you need, for example Datamatrix, Code128, QR, Databar14, DatabarLimited and DatabarExpanded, then pass Barkoder.constants.Formatting.GS1 to setFormatting. To read GS1 Composite symbols, turn composite decoding on:

JavaScript
              Barkoder.setEnableComposite(Barkoder.constants.EnableComposite.Enable);
            

Each result has a gs1 field that tells you whether the data is GS1 compliant. Parsed data arrives in formattedJSON, a JSON string you pass to JSON.parse, and in formattedText as key/value pairs.

Read GS1 codes on real packaging

Parsing only helps when the code scans. GS1 codes sit on small cartons, glossy foil, curved bottles and worn pallet labels, so the decoding engine matters as much as the parser.

GS1 parsing use cases

Teams use a GS1 barcode parser SDK wherever a scan has to fill more than one field.

Getting ready for GS1 Sunrise 2027

By the end of 2027, retail point-of-sale systems are expected to scan 2D barcodes, such as GS1 DataMatrix and QR codes with GS1 Digital Link, alongside the classic UPC and EAN. During the transition, packs carry both a linear barcode and a 2D code side by side.

A scanner that recognizes a QR code still has to extract the GTIN and the rest of the AI data from it. A camera-based SDK with a GS1 parser does both for GS1 DataMatrix, GS1 QR Code and GS1-128 on the phones, tablets and computers your staff already use. Digital Link QR codes are returned as web addresses for your app to resolve.

Parse GS1 barcodes on every major platform

The GS1 parser ships with the barKoder SDK. The GS1 formatting option is documented for Android, iOS, the Web SDK, Flutter, React Native, .NET MAUI, Capacitor, Cordova, NativeScript and Python.

  • 7 native & desktop SDKs
  • 6 cross-platform integrations
  • One consistent scanning core

Track-and-trace scanning in production

Teams using barKoder for traceability, inventory and delivery records.

GS1 Solution Provider, with data kept on the device

barKoder is an official GS1 Germany Solution Provider and is listed in the GS1 US Solution Provider Finder. Decoding and GS1 parsing run locally. The SDK goes online only for the license check, at least once every 30 days, and it does not store any information retrieved from scanning a barcode.

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.

GS1 parser and GS1 barcode decoder questions

What is the difference between a GS1 barcode decoder and a GS1 parser?

A decoder reads the symbol and returns one string with the identifiers and values run together, for example 0195012345678903 followed by 17280331 and 10A1B2C3. A GS1 parser reads the Application Identifiers in that string and returns each value as a labeled field: GTIN, expiry date, batch and serial number. barKoder does both in one SDK, on the device.

Which GS1 barcodes can barKoder parse?

GS1 DataMatrix, GS1-128, GS1 QR Code, all GS1 DataBar variants and GS1 Composite symbols, where the parser reads AIs from both the linear and the 2D part. The parser handles fixed- and variable-length AIs and follows GS1 General Specifications v24. It parses GS1 element strings marked with FNC1; GS1 Digital Link web addresses are returned as text and are not split into AIs.

What is the difference between Code 128 and GS1-128?

Code 128 is a barcode symbology. GS1-128 uses that symbology with a leading FNC1 character, GS1 Application Identifiers and GS1 data rules. Treating the two as the same leads to wrong parsing. In barKoder results, the gs1 flag tells you whether a scanned code is GS1 compliant.

GS1 DataMatrix vs QR code: which one should I use?

GS1 DataMatrix fits small labels in controlled settings such as pharmaceuticals, healthcare and manufacturing. A GS1 QR Code, or a QR code with GS1 Digital Link, suits consumer-facing packaging that both checkout systems and shoppers' phones scan. barKoder reads both. The GS1 parser splits a GS1 QR Code into AIs; a Digital Link QR code comes back as its web address. See GS1 DataMatrix vs GS1 QR Code.

What is GS1 Sunrise 2027?

It is GS1's target for retail point-of-sale systems to scan 2D barcodes, such as GS1 DataMatrix and QR codes with GS1 Digital Link, alongside UPC and EAN by the end of 2027. GS1 recommends dual marking during the transition. Read how to prepare for GS1 Sunrise 2027.

Can I read GS1 barcodes online for free?

Yes. The free online barcode scanner reads Data Matrix, Code 128, QR Code, GS1 DataBar and GS1 Composite from your camera or from a photo, in the browser. To get parsed GS1 fields inside your own app, use the SDK with a free 30-day trial license for up to 25 devices.

Does the GS1 parser need an internet connection?

Only for the license check, which each device needs at least once every 30 days. Scanning and GS1 parsing run on the device, and the SDK does not store information retrieved from scanning a barcode. Sending results to your backend or a national traceability system is a separate step that your app controls.

How do I choose the best SDK for scanning GS1 barcodes?

Test with real labels, not clean samples: small cartons, glossy foil, worn pallet labels. Use the phones your staff carry. Record how many codes scan and the time to the first read, then compare each parsed GTIN, expiry, batch and serial number with the printed text. Repeat after every SDK update.

Add GS1 barcode parsing to your app

Test the GS1 parser on your own GS1 DataMatrix, GS1-128 and DataBar labels with a free 30-day trial, or talk to an SDK expert about your project.