RFID Code Converter
Converter tool between SGTIN-96 (RFID Hex) and Barcode (GTIN) + Serial Number. Compatible with standard RFID readers like Zebra, Chainway, Impinj, Nextwaves. Based on GS1 EPC Tag Data Standard.
RFID Converter
Code Logic & Step-by-Step
// 1. Binary Conversion
// 2. Extract Fields (Bit Slice)
// 3. Determine Partition Rule (Partition ?)
// 4. Extract Company & Item
Developer Code
Use this utility logic in your project. Select a language below.
Explain
Understanding SGTIN & GTIN
Visualizing the relationship between your physical barcode and the electronic product code (EPC).

SGTIN-96 is a 96-bit binary string divided into 6 parts:
Detailed Analysis (Bit by Bit)
Standard prefix (00110000) identifying this as SGTIN-96.
...Object type (e.g. 1 = Retail Retail). See Reference Guide below.
...Partition X means: Company Code takes Y bits, Product Code takes Z bits.
...Unique company code assigned by GS1.
...Your specific product code.
...Unique identifier for each specific physical product.
Encoding Logic (Step-by-Step)
- Step 1: Determine the binary header value for the EPC schema. The binary header value for SGTIN-96 is “00110000.”
- Step 2: Select the Partition Value based on the number of digits in the Company Prefix from the Partition Value Table.
- Step 3: Convert the Filter Value, Partition Value, Company Prefix, Item Reference, and Serial # to binary value.
- Step 4: Concatenate in order Header, Filter, Partition, Company Prefix, Item Reference, and Serial # binary values to form the Binary EPC.
SGTIN-96 Reference Guide
FFilter Values (3 bits)
| Value | Description |
|---|---|
| 0 | All Others Used for items that do not fit other categories. Rarely used in general retail. |
| 1 | Point of Sale (POS) Trade Item The standard consumer unit sold at Point of Sale. Example: A single bottle of shampoo. |
| 2 | Full Case for Transport A standard shipping unit containing multiple items. Example: A carton of 12 shampoo bottles. Critical for logistics to distinguish 'one case' from 'one item'. |
| 3 | Reserved Reserved for future use. |
| 4 | Inner Pack Trade Item Grouping A grouping smaller than a full case, often for shelf display or handling. Example: A shrink-wrapped 3-pack inside the main carton. |
| 5 | Reserved Reserved for future use. |
| 6 | Unit Load A large logistical unit, typically a pallet containing multiple cases. |
| 7 | Component inside Consumer Unit A specific part inside a consumer unit. Example: The battery cover inside a toy. |
PPartition Table (3 bits)
| Value | Company Prefix (Bits / Digits) | Item Reference (Bits / Digits) |
|---|---|---|
| 0 | 40 / 12 | 4 / 1 |
| 1 | 37 / 11 | 7 / 2 |
| 2 | 34 / 10 | 10 / 3 |
| 3 | 30 / 9 | 14 / 4 |
| 4 | 27 / 8 | 17 / 5 |
| 5 | 24 / 7 | 20 / 6 |
| 6 | 20 / 6 | 24 / 7 |