IRONSOFTWAREHOME

GS1-128

Curtis Chau
Curtis Chau
Updated: April 22, 2026

Does IronBarcode Support GS1 UCC/EAN-128 Symbology?

Barcodes with GS1 are recognized and decoded accurately. However, the issue lies in the current lack of brackets in the displayed barcode value.

When using GS1-128, IronBarcode currently outputs: 01950123456789033103000123 (which is recognized as a Code 128 barcode with GS1 signature). The desired value to be displayed on the image output would be: 01950123456789033103000123. However, the barcode scanner will output (01)95012345678903(3103)000123 with a detection of the barcode type as Code128.

For generating a GS1-128 barcode, use the following code:

using IronBarCode;

class BarcodeExample
{
    static void Main()
    {
        // Create a GS1-128 barcode using the specified value
        GeneratedBarcode barcode = BarcodeWriter.CreateBarcode("01950123456789033103000123", BarcodeWriterEncoding.Code128GS1);

        // Add the barcode value text below the barcode on the generated image
        barcode.AddBarcodeValueTextBelowBarcode();

        // Save the barcode image as a PNG file
        barcode.SaveAsPng("gs1code128.png");
    }
}

Output barcode

Output barcode example

The above code generates a GS1-128 barcode with a default divider. If you want to add additional dividers, you can insert the Unicode separator \u00f1. However, note that when using the AddBarcodeValueTextBelowBarcode method, the Unicode character ñ (code 0x00F1) will be displayed. To overcome this limitation, an alternative approach is to manipulate the string and pass the modified value to the AddAnnotationTextBelowBarcode method. This way, you can achieve the desired display of the barcode value without the ñ character.

using IronBarCode;

class BarcodeExampleWithAnnotation
{
    static void Main()
    {
        // Original barcode value
        string barcodeValue = "0195012345678903310300012300\u00f10000000123300000\u00f10000012312300000";
        
        // Remove unwanted unicode characters for display purposes
        string trimmedString = barcodeValue.Replace("\u00f1", "");

        // Create a GS1-128 barcode using the original value
        GeneratedBarcode barcode = BarcodeWriter.CreateBarcode(barcodeValue, BarcodeWriterEncoding.Code128GS1);

        // Add a custom annotation text below the barcode with the trimmed value
        barcode.AddAnnotationTextBelowBarcode(trimmedString);

        // Save the barcode image as a PNG file
        barcode.SaveAsPng("gs1code128.png");
    }
}

Output barcode

Output barcode with annotation example

When scanning the barcode, the output will be (01)95012345678903(3103)000123(00)0000000123300000(00)00012312300000, and the barcode type will be detected as GS1Code128.

Analyze GS1-128 Encoding

IronBarcode can also analyze the physical encoding of a GS1-128 barcode, showing which Code 128 character sets (A, B, or C) are used for each segment of the data. Use the Code128GS1Parser.ParseWithEncoding method to parse a GS1 string with encoding analysis included.

using IronBarCode;

// GS1-128 with encoding analysis
var gs1Result = Code128GS1Parser.ParseWithEncoding("(01)09501101530003");
Console.WriteLine(gs1Result.CharacterSetSummary);  // "C"
Console.WriteLine(gs1Result.HasEncodingInfo);      // true

Since GS1-128 data is primarily numeric, the encoder uses Code C for maximum compactness. The HasEncodingInfo property confirms that encoding analysis is available on the result.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...
Read More

Ready to Get Started?

Nuget Downloads 2,422,100Version:2026.9just released

Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package BarCode
nuget.org/packages/BarCode/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronBarCode"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

  1. Download and unzip IronBarCode to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronBarCode.dll"

Licenses from $999

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required