npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@openrfid/gs1

v1.0.0

Published

GS1 Tag Data Standard encoding and decoding for SGTIN-96, GRAI-96, GIAI-96.

Readme

@openrfid/gs1

GS1 SGTIN-96, GRAI-96, & GIAI-96 Barcode & EPC Tag Encoders/Decoders

npm version License: MIT Powered By


🚀 Overview

@openrfid/gs1 provides bit-level bidirectional conversion between GS1 Enterprise Identifiers (UPC / GTIN barcodes) and 96-bit Gen2 RFID EPC Tag Headers. It supports SGTIN-96 (Serialized Global Trade Item Number), GRAI-96 (Global Returnable Asset Identifier), and GIAI-96 (Global Individual Asset Identifier) encoding standards across partition tables 0 through 6.

Developed & Maintained by RFID Software India Private Limited.


📦 Installation

# npm
npm install @openrfid/gs1

# pnpm
pnpm add @openrfid/gs1

💻 Code Example

1. Encode GTIN-14 Barcode + Serial to SGTIN-96 EPC Hex

import { encodeSgtin96, decodeSgtin96 } from '@openrfid/gs1';

// Convert UPC/GTIN + Serial Number to 96-bit RFID EPC Hex string
const gtin = '00614141000024'; // 14-digit GTIN (Company Prefix: 0614141, Item Ref: 00002)
const serial = 1048576; // Integer serial number
const filterValue = 3;  // Filter 3 = Single Shipping Unit

const epcHex = encodeSgtin96({ gtin, serial, filter: filterValue });
console.log('Generated SGTIN-96 EPC Hex:', epcHex);
// Output: "3034257BF4000B4000100000"

2. Decode SGTIN-96 EPC Hex to GTIN Barcode

import { decodeSgtin96 } from '@openrfid/gs1';

const epcHex = '3034257BF4000B4000100000';
const decoded = decodeSgtin96(epcHex);

console.log('GTIN-14:', decoded.gtin);      // "00614141000024"
console.log('Company Prefix:', decoded.companyPrefix); // "0614141"
console.log('Item Reference:', decoded.itemReference); // "00002"
console.log('Serial Number:', decoded.serial); // 1048576
console.log('Filter Value:', decoded.filter);  // 3

📚 Supported GS1 Standards & Partition Tables

| Standard | Header (Hex) | Description | Use Case | | :--- | :---: | :--- | :--- | | SGTIN-96 | 0x30 | Serialized Global Trade Item Number | Retail, Consumer Goods, Apparel | | GRAI-96 | 0x33 | Global Returnable Asset Identifier | Reusable Pallets, Cages, Containers | | GIAI-96 | 0x34 | Global Individual Asset Identifier | Fixed Capital Assets, Medical Devices |


🌐 Monorepo Ecosystem

| Package | Description | | :--- | :--- | | @openrfid/epc | Bit-level EPC Gen2 memory bank encoders/decoders | | @openrfid/tags | RFID tag domain models & memory generator | | @openrfid/simulator | High-throughput inventory simulation engine |


📄 License & Corporate Support

Licensed under the MIT License.
Brought to you by RFID Software India Private Limited.
For enterprise RFID middleware, hardware drivers, or custom protocol plugins, visit rfidsoftwares.com.