How To Check Expiry Date From Barcode: Complete GS1 Decoding Guide

How To Check Expiry Date From Barcode: Complete GS1 Decoding Guide

How To Check Expiration Date - Et to request your ktn expiration date ...

Direct extraction of product expiration dates from barcodes requires identifying specific 2D or extended linear symbologies like GS1-128 or GS1 DataMatrix, which encode date strings using Application Identifier (17) or (15) in a standardized YYMMDD format. Standard 1D UPC-A and EAN-13 retail barcodes only store static item numbers, requiring database cross-referencing or specialized GS1-compliant scanner applications to parse encoded freshness parameters.


Technical Requirements & Symbology Diagnostics Checklist

Determining an expiration date directly from a barcode depends entirely on the type of symbol printed on the packaging. Traditional retail barcodes contain only a static product identifier, whereas supply chain and healthcare packaging use advanced standards established by GS1 to encode variable data like lot numbers, production dates, and shelf-life limits.

Before attempting to decode an expiration date, verify your scanning environment and target barcode format against this technical baseline:



  • Essential Hardware & Scanning Tools:

    • A camera-enabled smartphone equipped with a GS1-compliant decoder app (such as Scandit, Cognex Barcode Scanner, or GS1 SmartScan).
    • A handheld 2D area-imager scanner (e.g., Honeywell Xenon series or Zebra DS2208) configured to output raw ASCII strings and interpret GS1 Application Identifiers.
    • An active connection to an inventory management system or Enterprise Resource Planning (ERP) database if scanning standard 1D barcodes.
  • Mandatory Knowledge Standards & Specifications:

    • Understanding of GS1 Application Identifiers (AIs), specifically AI (17) for Expiration Date, AI (15) for Best Before Date, and AI (11) for Production Date.
    • Familiarity with the standardized GS1 date structure: YYMMDD (Year-Month-Day).
    • Knowledge of ASCII 29 Group Separator (GS) control characters used in concatenated dynamic barcodes.
  • Operational Benchmarks:

    • Estimated Cost: $0 for open-source smartphone parsing apps; $150–$400 for hardware 2D area imagers.
    • Processing Duration: 1 to 3 seconds per scan using automated software parsers; 30 to 60 seconds for manual string interpretation.

Step-by-Step Workflow for Parsing Encoded Barcode Dates

Follow this technical workflow to identify barcode structures, scan variable data fields, and correctly translate raw string outputs into standardized expiration calendar dates.



Step 1: Identify the Barcode Symbology on the Package

Examine the physical barcode printed on the product. Look closely at its shape and geometry to determine if date data is natively embedded.



  1. Linear 1D Barcodes (UPC-A, EAN-13): These consist purely of vertical black bars with a 12-digit or 13-digit number below. These symbols do not contain expiration dates within their bar patterns. They only store the Global Trade Item Number (GTIN).
  2. Extended Linear Barcodes (GS1-128): These are wider vertical barcodes containing parentheses in the human-readable text below the bars, such as (01)0036000291452(17)241231. These natively contain expiration dates.
  3. Two-Dimensional Matrix Codes (GS1 DataMatrix or GS1 QR Code): These are square or rectangular grid patterns made up of small black and white modules. Commonly found on pharmaceuticals, medical devices, and fresh produce, these symbols almost always encode expiration dates alongside batch numbers.

Pro-Tip: If the package only features a standard 12-digit UPC-A barcode, you cannot read the expiration date directly from the black lines. You must scan the GTIN into an ERP or POS system linked to a lot-tracking database.



Step 2: Scan the Barcode Using a GS1-Aware Parsing Tool

Open a dedicated GS1 barcode parser app or configure your hardware scanner to transmit raw data strings including Application Identifiers. Avoid standard built-in camera apps that automatically convert raw data into simple browser search queries.



  1. Align the camera or laser scanner perpendicular to the barcode surface at a distance of 4 to 8 inches.
  2. Ensure adequate lighting to avoid reflections on glossy foil or plastic packaging.
  3. Capture the raw payload string generated by the scanner engine.


Step 3: Locate the Expiration Date Application Identifier (AI)

Examine the raw decoded text string returned by the scanner software. GS1 specifications use standardized numeric prefixes called Application Identifiers to define what the subsequent characters mean.



  1. Scan the string for AI (17) or the plain digits 17 immediately following a GS1 header or Group Separator. AI (17) designates the Expiration Date (Use-By Date).
  2. Look for AI (15) if AI (17) is absent. AI (15) designates the Best Before Date.
  3. Look for AI (11) if tracking manufacturing age. AI (11) designates the Production Date.

For example, in the raw output string 01095212345678901725063010BATCH99, the segment 17 indicates that the following six digits (250630) represent the expiration date.



Step 4: Translate the YYMMDD Date String

Convert the 6-digit GS1 numeric payload into a standard calendar date using the strict YYMMDD format structure.



  1. Extract Year (YY): The first two digits represent the two-digit calendar year. For example, 25 equals 2025.
  2. Extract Month (MM): The middle two digits represent the calendar month from 01 (January) to 12 (December). For example, 06 equals June.
  3. Extract Day (DD): The final two digits represent the day of the month from 01 to 31. For example, 30 equals the 30th day.

Using the string 250630:



  • 25 = 2025
  • 06 = June
  • 30 = 30th day
  • Result: The product expires on June 30, 2025.

Warning: If the day digits (DD) are encoded as 00, GS1 standards dictate that the product expires on the last day of the specified month. For instance, 250600 translates to June 30, 2025.



Step 5: Query External Databases for Standard 1D Barcodes

When dealing with standard UPC-A or EAN-13 barcodes that lack embedded GS1 AI fields, obtain the date via database lookup.



  1. Capture the 12-digit or 13-digit GTIN payload from the scanner.
  2. Transmit an API request to your warehouse management system (WMS) or an external database (e.g., Open Food Facts or proprietary supplier portals).
  3. Match the incoming GTIN and lot/serial code printed elsewhere on the box against the receiving log to extract the recorded shelf-life matrix.

Qr Codes,Barcodes & Expiry Dates by Doverco

Qr Codes,Barcodes & Expiry Dates by Doverco

GS1 Barcode Symbology & Expiration Encoding Matrix

The following matrix compares primary barcode types, their capability to natively embed expiration parameters, and the technical structures used to transmit freshness metrics.



Barcode Symbology Native Expiration Support Primary Application Identifier (AI) Data Payload Structure & Example Practical Operational Use Case
UPC-A / EAN-13 No (Requires External Database) None 012345678905 (GTIN-12 only) Retail Point-of-Sale checkout for stable shelf goods.
GS1-128 (Code 128) Yes (Native) AI (17) or AI (15) (01)0036000291452(17)241231 Master carton shipping, logistics, and wholesale tracking.
GS1 DataMatrix Yes (Native) AI (17) Expiration / AI (10) Lot 1725103110ABC123 Pharmaceutical unit-of-issue, healthcare, and medical devices.
GS1 QR Code Yes (Native) AI (17) embedded in URI/String https://id.gs1.org/01/00012345678905/17/251231 Direct consumer engagement, digital link batch verification.
ITF-14 No None 10012345678902 (GTIN-14 only) Bulk outer corrugated box identification without dynamic tracking.

Common Decoding Errors & Field Resolutions

When reading expiration dates from production-line barcodes, ambient lighting issues, non-compliant formatting, and hardware misconfigurations can lead to parsing failures.



  • Raw Scan Returns Only a Generic Numerical String Without Explicit Date Fields

    • Root Cause: The product uses a standard 1D UPC-A/EAN-13 barcode, or your scanning hardware is configured to strip out GS1 Application Identifiers and transmit only the primary GTIN payload.
    • Actionable Fix: Verify the barcode physical type. If it is a 2D DataMatrix or GS1-128 code, access your scanner's programming manual and scan the configuration barcode labeled Enable GS1 Application Identifier Parsing or Transmit Symbology Identifiers.
  • The Parsed Date Appears Invalid or Shows an Non-Existent Month (e.g., Month 24)

    • Root Cause: The scanning system is misinterpreting the variable-length data field preceding the expiration date, causing character shifting. This typically happens when a variable-length field like AI (10) Batch Number lacks an ASCII 29 Group Separator (GS) terminator.
    • Actionable Fix: Re-order the printed fields so fixed-length Application Identifiers—such as AI (17) which is strictly 6 digits—appear before variable-length fields in the bar code string, or update your software decoder to correctly parse the GS control character (HEX 1D).
  • Date Reading Reverses the Day and Month Parameters

    • Root Cause: Operators are manually reading the raw data and assuming localized regional formats (e.g., US MMDDYY or European DDMMYY) instead of enforcing strict GS1 standards.
    • Actionable Fix: Enforce a strict programmatic conversion rule in your receiving software: all GS1 date strings extracted from AI (17) or AI (15) must be systematically parsed as YYMMDD, regardless of the geographic location of the warehouse or store.
  • Scanner Returns an Error on Expiration Days Encoded as "00"

    • Root Cause: The database system or software validation script expects a standard day value between 01 and 31 and rejects 00 as a syntax error.
    • Actionable Fix: Update the validation logic in your database engine to recognize that under GS1 specs, 00 denotes the final calendar day of the given month (e.g., 240200 must resolve to February 29 on leap years or February 28 on standard years).

Frequently Asked Questions



Can you tell the expiration date from a regular 12-digit UPC barcode?

No, regular 12-digit UPC-A barcodes do not contain encoded expiration dates within their bar patterns. They only store the Global Trade Item Number used to identify the product type, requiring inventory software to cross-reference the GTIN against receiving records to locate lot shelf-life data.



What does AI (17) mean on a product barcode?

In GS1 specification standards, AI (17) stands for Application Identifier (17), which indicates that the six digits immediately following it represent the product's official Expiration Date. This date is formatted strictly as YYMMDD, defining the final date the product remains safe and effective for use.



Why does my scanner show a 6-digit number after scanning a 2D barcode?

When scanning a GS1 DataMatrix or GS1 QR code, the 6-digit number following an Application Identifier like (17) or (15) is the encoded date payload formatted as Year-Month-Day. For instance, the sequence 260315 represents March 15, 2026.



What is the difference between AI (15) and AI (17) in barcode specifications?

AI (15) specifies the "Best Before Date," indicating the point up to which product quality or flavor remains optimal, whereas AI (17) specifies the strict "Expiration Date" or "Use-By Date," after which the product may become unsafe for consumption or lose pharmaceutical efficacy.



How do I manually read a barcode string containing a batch and expiration date?

Locate the prefix 17 or (17) within the text string printed beneath or embedded inside the barcode payload. Read the next six numbers directly as YYMMDD, then locate the prefix 10 or (10) to find the alphanumeric batch or lot number that follows it.

Automate Your Inventory Freshness Tracking

Implementing automated GS1 barcode decoding reduces manual receiving errors and prevents expired stock from reaching customers. Upgrade your supply chain operations by deploying 2D area-imagers and GS1-compliant inventory management software across your logistics network.


How to Read Expiry Dates on GS1 Barcodes | Medical Stock Guide

How to Read Expiry Dates on GS1 Barcodes | Medical Stock Guide

Read also: New digital platforms will host the next major stevequayl content series