— Developer Tools

Free GS1 Barcode Parser

Paste GS1 barcode data, as printed text, scanner output or a Digital Link, to see each application identifier with its check digits and dates.

— Samples
Identifiers 4Valid
Live

What is a GS1 Barcode Parser?

GS1 barcodes on medicine packs, food, pallets and parcels carry more than a product number: expiry dates, batches, serial numbers, weights and shipping codes, each tagged with an application identifier such as (17). This parser reads them all and checks them.

It accepts the bracketed text printed under a barcode, raw scanner output with FNC1 group separators, and GS1 Digital Link URIs from QR codes. Around eighty application identifiers are named, GTIN, SSCC and GLN check digits are verified, dates and weights are decoded, and the data converts to Digital Link or a raw element string.

Key Features

Three Input Forms

Bracketed text, raw scanner data with separators, or a Digital Link URI.

Check Digits Verified

GTIN, SSCC, GLN and other keys checked with GS1’s mod-10 rule.

Values Decoded

Dates with day 00, weights and prices with implied decimals, and the GTIN type.

Digital Link and Back

Convert any element string to a GS1 Digital Link URI, or read one back.

Stays in Your Browser

Barcode data is parsed locally and never uploaded.

Perfect for everyone

  • Warehouse and supply chain teams
  • Pharmacy serialisation staff
  • Label designers and developers handling scanner input

How to Use the GS1 Barcode Parser

Paste what the barcode or label says. The parser works out which of the three input forms you gave it, so there is nothing to choose before you start.

1

Scan or Copy

Scan into a text field, copy the text under the barcode, or copy a QR code’s URL.

2

Paste It

Brackets, <GS> markers, ]C1 or ]d2 prefixes and Digital Links are all recognised.

3

Check the Fields

Each AI is named, with check digits and dates verified underneath.

4

Convert

Switch to Digital Link for QR codes, or to Element string for the raw barcode data.

Worked Examples

GS1 Data, Parsed

Each row is GS1 data as a label shows it or a scanner sends it, and each answer is this parser’s output in the mode on the chip. 09501101530003 is GS1’s own example GTIN, so it is safe to reuse in tests and documentation.

REF_001A medicine pack’s label

“(01)09501101530003(17)270131(10)AB-123(21)SN-000042”

REF_002A pallet’s GS1-128 as scanned

“]C10037612345000000001602095011015300033724<GS>310301250015270600”

REF_003The pack as a Digital Link

“(01)09501101530003(17)270131(10)AB-123(21)SN-000042”

REF_004The pack’s raw element string

“(01)09501101530003(17)270131(10)AB-123(21)SN-000042”

REF_005A GTIN with a wrong check digit

“(01)09501101530004(10)AB-123”

REF_006A Digital Link from a QR code

“https://id.gs1.org/01/09501101530003/10/AB-123?17=270131”

REF_007A plain EAN-13

“5901234123457”

REF_008A price with a currency

“(3932)9781299”

REF_009A thirteenth month

“(17)271301”

REF_010A GTIN one digit short

“(01)0950110153000”

Application Identifiers

The AIs You Will See Most

GS1 defines hundreds of application identifiers, but these ten cover most labels on consumer goods, medicines and pallets. Learn them and most barcode text becomes readable at a glance.

01 / 01

(01) GTIN

The 14-digit product number, with shorter GTINs padded with leading zeros.

“How long is an AI 01 value?”

02 / 00

(00) SSCC

The 18-digit serial shipping container code on pallets and cartons.

“What does an SSCC identify?”

03 / 17

(17) Expiry

The expiration date as YYMMDD.

“What does day 00 mean?”

04 / 10

(10) Batch or Lot

Up to 20 characters identifying the production batch.

“Is AI 10 fixed length?”

05 / 21

(21) Serial

A unique serial number, required on medicines in many countries.

“What pairs with AI 21 to identify one pack?”

06 / 15

(15) Best Before

The best before date, mostly on food.

“Is (15) a safety date?”

07 / 02

(02) and (37)

The GTIN of the items inside a pallet, and how many there are.

“Which AI counts items?”

08 / 310N

(310n) Net Weight

Six digits in kilograms, with the fourth digit giving the decimal places.

“What is (3103)012500?”

09 / 400

(400) Order Number

The customer’s purchase order number, on shipping labels.

“Is it fixed length?”

10 / 414

(414) GLN

A physical location’s Global Location Number.

“How long is a GLN?”

The GS1 Identification Keys

Application identifiers carry data, but a few of them carry GS1 keys: globally unique numbers built from a company prefix that GS1 licenses. These are the keys you will meet and what each one identifies, with the application identifier that carries it.

GTIN

Identifies a product at any packaging level, from a single item to a case. AI 01.

SSCC

Identifies one logistic unit, such as a pallet, for its whole journey. AI 00.

GLN

Identifies a location or a legal entity, such as a warehouse door or a company. AIs 410 to 416.

GRAI

Identifies a returnable asset such as a crate or keg, optionally with a serial. AI 8003.

GIAI

Identifies a fixed asset such as a machine or a laptop. AI 8004.

GSRN

Identifies a service relationship, such as a patient or a loyalty member. AIs 8017 and 8018.

GDTI

Identifies a document type, with an optional serial for one document. AI 253.

Barcodes That Carry GS1 Data

The same element string can be printed in several barcode types. Each suits a different job, from the checkout to the warehouse, and scanners report which one they read with a three-character symbology identifier at the start of the data, which this parser strips before reading.

Tip 01

EAN-13 and UPC-A

Retail point-of-sale barcodes. They hold a GTIN only, with no application identifiers.

Tip 02

GS1-128

The long linear barcode on cartons and pallets, able to hold several AIs. Scanners report it as ]C1.

Tip 03

GS1 DataMatrix

The small square code on medicines and medical devices, reported as ]d2.

Tip 04

GS1 QR Code

Holds an element string or a Digital Link, reported as ]Q3, and opens on phones.

Tip 05

GS1 DataBar

Compact linear codes for fresh food, able to carry weights and expiry dates.

Tip 06

ITF-14

A sturdy code printed on corrugated cases, holding a GTIN-14 only.

How GS1 Data Is Encoded

The same GS1 data looks different on a label, in a scanner and in a URL. Knowing the conventions explains why scanners need FNC1, why some fields need no separator, and why the printed text and the scanned data rarely look identical.

Brackets on Labels

The text under a barcode shows each AI in brackets. The brackets aren’t encoded.

FNC1

The barcode starts with FNC1 to mark GS1 data, and scanners announce it as ]C1, ]d2 or ]Q3.

Predefined Lengths

AIs such as 01, 17 and 00 have fixed lengths, so the next AI follows directly.

Group Separators

Variable-length fields such as 10 and 21 end with FNC1, sent as the GS character (ASCII 29).

Field Order

Putting fixed-length fields first and one variable field last saves separators.

Digital Link

QR codes carry the same data as a web address, so phones can open product information.

Checking a Check Digit

Every GTIN, SSCC and GLN ends in a check digit that catches most typing and scanning errors. Working one out by hand takes a minute and explains what the parser verifies. The same five steps apply to every GS1 key, whatever its length.

Tip 01

Start From the Right

Ignore the check digit, then number the remaining digits from the right.

Tip 02

Weight 3 and 1

Multiply the rightmost digit by 3, the next by 1, then 3, 1 and so on.

Tip 03

Add and Round Up

Add the products, then find the amount needed to reach the next multiple of 10.

Tip 04

The Result

That amount, from 0 to 9, is the check digit. For 0950110153000 it’s 3.

Tip 05

What It Catches

All single-digit errors and most swaps of neighbouring digits.

When to Parse GS1 Data

Whenever barcode data needs reading or checking, whether it comes from a handheld scanner in a warehouse, a phone camera, or a label file before it goes to the printer.

Medicine Verification

Read the GTIN, expiry, batch and serial from a pack’s DataMatrix.

Receiving Goods

Check the SSCC, contents and weights on a pallet label.

Debugging Scanners

See whether a scanner sends group separators and a symbology identifier.

Designing Labels

Check element strings and check digits before printing thousands of labels.

Moving to QR Codes

Convert existing barcode data to GS1 Digital Link for QR codes on packs.

GS1 Pitfalls

Mistakes that make GS1 data fail, usually discovered only when a trading partner rejects a delivery or a pharmacy scanner refuses a pack. Most are easy to catch before printing.

Tip 01

Missing Separators

Without FNC1 after a variable field, the next AI is read as part of its value.

Tip 02

Encoding the Brackets

Brackets are for people. A barcode that encodes them won’t scan as GS1.

Tip 03

Short GTINs

AI 01 always takes 14 digits, so EAN-13 and UPC-A need leading zeros.

Tip 04

Two-Digit Years

GS1 resolves YYMMDD with a sliding 100-year window around the current year.

Tip 05

Implied Decimals

In 3103, the last digit says three decimals, so 012500 is 12.5 kg, not 12,500.

Tip 06

Scanner Settings

Many scanners drop the GS character unless configured to send it.

Frequently Asked Questions