EPC Encoder Decoder: SGTIN, SSCC, GRAI and GIAI
Encode a GS1 key as an RFID EPC, or decode an EPC from hex, with this EPC encoder decoder: SGTIN-96, SGTIN-198, SSCC-96, GRAI-96 and GIAI-96 from the GS1 EPC Tag Data Standard 2.3. You get the hex, the pure identity and tag URIs, the GS1 element string and every bit labelled, without uploading anything.
SGTIN-96 · filter 3 (Reserved) · 11-digit GS1 Company Prefix · 96 bits
- EPC (hex)
3066C4409047E14000001A85- Pure identity URI
urn:epc:id:sgtin:95060001343.05.6789- Tag URI
urn:epc:tag:sgtin-96:3.95060001343.05.6789- GS1 element string
(01)09506000134352(21)6789
| Field | Bits | Count | Value |
|---|---|---|---|
| Header | 00110000 | 8 | 30 (SGTIN-96) |
| Filter | 011 | 3 | 3 (Reserved) |
| Partition | 001 | 3 | 1 (11-digit company prefix) |
| GS1 Company Prefix | 1011000100010000001001000001000111111 | 37 | 95060001343 |
| Indicator and item reference | 0000101 | 7 | 05 |
| Serial | 00000000000000000000000001101010000101 | 38 | 6789 |
Binary
001100000110011011000100010000001001000001000111111000010100000000000000000000000001101010000101
How to Encode or Decode an EPC
Enter the GS1 element string with its company prefix length and filter value to get the EPC, or paste the hex a reader shows to get the GS1 key back.
- To encode, type the element string with its AIs in brackets, such as (01)09506000134352(21)6789.
- Choose the length of your GS1 Company Prefix and the filter value for the object the tag goes on.
- Copy the hex for your tag encoder, or the tag URI for your software.
- To decode, open Decode and paste the EPC hex or a tag URI: the GS1 key, the URIs and every field appear.
EPC Schemes This Tool Encodes
It encodes and decodes five of the standard's binary schemes, the ones for trade items, logistic units, returnable assets and individual assets.
| Scheme | Header | GS1 key | Serial or reference |
|---|---|---|---|
| SGTIN-96 | 30 | GTIN (01) with serial (21) | Digits only, no leading 0, below 2^38 |
| SGTIN-198 | 36 | GTIN (01) with serial (21) | Up to 20 of the 82 GS1 characters |
| SSCC-96 | 31 | SSCC (00) | In the SSCC itself |
| GRAI-96 | 33 | GRAI (8003) with serial | Digits only, no leading 0, below 2^38 |
| GIAI-96 | 34 | GIAI (8004) | Digits only after the company prefix, no leading 0 |
SGTIN-96 and SGTIN-198
Both carry a GTIN with a serial number and give the same EPC URI. SGTIN-96 fits in 96 bits but holds only numeric serials below 274,877,906,944 without a leading zero; any other serial needs SGTIN-198, which writes up to 20 characters in 7 bits each.
Not on This Page
GRAI-170 and GIAI-202 for alphanumeric serials, SGLN, GSRN, GDTI and the other schemes, and the newer + and ++ encodings of TDS 2.0 are not encoded here. The tool says so when a value needs one of them.
How an RFID EPC Code Is Built
A 96-bit EPC is a row of fields: an 8-bit header that names the scheme, a 3-bit filter, a 3-bit partition, the company prefix, the item or asset reference, and the serial.
The Partition Value
The partition tells a reader how many digits the company prefix has, so it can split the fixed 44 bits of an SGTIN between the prefix and the item reference. A 7-digit prefix is partition 5 (24 bits) and an 11-digit prefix is partition 1 (37 bits).
| Partition | Prefix digits | Prefix bits | Item reference digits | Item reference bits |
|---|---|---|---|---|
| 0 | 12 | 40 | 1 | 4 |
| 1 | 11 | 37 | 2 | 7 |
| 2 | 10 | 34 | 3 | 10 |
| 3 | 9 | 30 | 4 | 14 |
| 4 | 8 | 27 | 5 | 17 |
| 5 | 7 | 24 | 6 | 20 |
| 6 | 6 | 20 | 7 | 24 |
The Filter Value
The filter lets a reader skip tags it does not need, such as cases when it counts single items. The standard asks you to choose the value that describes the object, such as 1 for a point-of-sale trade item, and to use 0, All Others, only when no value fits.
EPC and Barcode: The Same GS1 Key
An EPC carries the same GS1 key as the barcode, minus its check digit, so a tag and a barcode can identify the same item.
The EPC URI leaves out the GTIN's check digit; the decoder calculates it again to give the element string. A GTIN-12 (UPC-A) is written as a 14-digit GTIN with two leading zeros, and its U.P.C. Company Prefix becomes a GS1 Company Prefix one digit longer, with a leading 0.
Check digit calculator works out the check digit of a GTIN, SSCC or GRAI step by step.
Pure Identity URI and Tag URI
The pure identity URI names the object; the tag URI adds what the tag needs to rebuild the bits: the scheme with its size, and the filter value.
- Pure identity: urn:epc:id:sgtin:95060001343.05.6789, the same for SGTIN-96 and SGTIN-198.
- Tag URI: urn:epc:tag:sgtin-96:3.95060001343.05.6789, with the scheme and filter 3.
- Escapes: seven of the 82 serial characters, such as / and %, are written as %2F and %25 in a URI.
GS1 EPC Tag Data Standard Release 2.3, ratified October 2025: the schemes, partition tables and filter values this tool follows.
Why the Company Prefix Length Matters
The EPC splits the GS1 key into the company prefix and the rest, and the number itself does not say where the prefix ends.
The standard notes that this length has to be looked up, for example in a table of company prefixes. Your GS1 member organization gives the length with your prefix; a wrong length still encodes, but to a different EPC from the one other systems expect.
Barcode lookup shows the GS1 Prefix of a number and the member organization that issued it.
Frequently Asked Questions
What Is an EPC on an RFID Tag?
The Electronic Product Code is the identifier written in a tag's EPC memory, defined by the GS1 EPC Tag Data Standard. For GS1 keys it holds the same company prefix and reference as the barcode, as bits a reader returns in hex.
Why Is the GTIN Check Digit Not in the EPC?
The standard leaves it out of the EPC URI and the bits, because it can always be calculated from the other digits. The decoder adds it back in the element string.
When Do I Need SGTIN-198 Instead of SGTIN-96?
When the serial has letters or symbols, starts with a zero, or is 274,877,906,944 or more. Automatic mode picks SGTIN-198 for those serials.
Can This Tool Write an RFID Tag?
No. It gives the hex and the tag URI; your tag printer or encoder software writes them to the tag, and a reader shows the hex to decode here.
Which Filter Value Should I Use?
The one that describes the tagged object in the standard's table, such as 1 for a point-of-sale trade item or 2 for a full case for transport. Use 0, All Others, only when no value fits.
Which Version of the Standard Does It Follow?
The GS1 EPC Tag Data Standard Release 2.3, ratified in October 2025. Every example of its Annex E for these five schemes is checked in both directions.
Related Barcode Tools
- Check digit calculator
The check digit of a GTIN, SSCC or GRAI.
- Barcode lookup
The GS1 Prefix and type of a number.
- GS1-128 barcode generator
The same GS1 keys as a barcode.
- SSCC barcode generator
SSCC labels for pallets and cases.