GS1 EPC Encoder & Decoder (SGTIN-96)

Enter a GTIN, the length of its GS1 Company Prefix, a filter value and a serial number to get the 96-bit EPC in hex, the EPC pure identity URI and the EPC tag URI, with every field of the 96 bits laid out. Paste an EPC to decode it, or download a range of serials as a CSV. It runs entirely in this page; nothing you enter is sent anywhere or saved.

Rules: GS1 EPC Tag Data Standard 2.3 (ratified October 2025). Sources

Updated

Encode or decode

Mode

8, 12, 13 or 14 digits, including the check digit.

From the GS1 Member Organisation that licensed the prefix, or from the brand owner: the GTIN alone does not show where the prefix ends. How the length sets the partition

Describes the tagged object so readers can select it; not part of the EPC. 3 and 5 are reserved.

A whole number from 0 to 274,877,906,943, with no leading zeros.

Result

Enter a GTIN, choose its company prefix length and enter a serial number to see the SGTIN-96.

EPC in hex (96 bits)

–
EPC pure identity URI
–
EPC tag URI
–
GTIN and serial (GS1 element string)
–
Bit-by-bit breakdown

–

FieldBitsBinaryValue
No EPC yet.

Want the labels encoded for you?

We make UHF RFID labels and dry and wet inlays in our Shenzhen factory and can encode them with your EPC list; the RFID encoding service page explains how encoding works. Nothing you entered here is added to the inquiry: send your EPC list or serial plan in your message.

Encoded samples are customised samples, so a setup fee applies, confirmed in the quotation.

Batch: a CSV of consecutive serials

Uses the GTIN, prefix length and filter value above, and makes one row per serial with the serial, the EPC hex and the pure identity URI. Leave the first serial empty to start at the serial number above. Up to 10,000 serials per file.

The file is made in this page and saved by your browser. In a spreadsheet, import the columns as text so long numbers are not rounded.

How an SGTIN-96 is built

A GTIN identifies a product; an SGTIN, a serialised GTIN, adds a serial number that identifies one physical item. SGTIN-96 is the 96-bit way of writing it to the EPC memory of a UHF RFID tag, and the GS1 EPC Tag Data Standard 2.3 defines every bit of it. Here is the standard’s own example (Appendix E.1), worked through by the encoder above:

FormValue
GS1 element string: GTIN (01) and serial (21)(01)09506000134352(21)6789
EPC pure identity URIurn:epc:id:sgtin:95060001343.05.6789
EPC tag URI, with filter value 3urn:epc:tag:sgtin-96:3.95060001343.05.6789
EPC in hex3066C4409047E14000001A85

From GTIN to EPC

Write the GTIN as 14 digits, adding leading zeros to a GTIN-8, GTIN-12 or GTIN-13. The first digit is the indicator digit (a pad 0 for the shorter GTINs), then come the company prefix, the item reference and the check digit. The EPC keeps the company prefix as its first field, moves the indicator digit to the front of the item reference and drops the check digit, which can be recalculated (TDS 2.3 §7.3). In the example the prefix is the 11 digits 95060001343, so the item reference field is the pad digit 0 and the item reference 5: 05. The serial is the number a GS1 element string carries after application identifier (21).

The 96 bits, field by field

FieldBitsBinaryValue
Header 8 00110000 30 (hex)SGTIN-96
Filter value 3 011 3Reserved
Partition 3 001 111-digit company prefix (37 bits), 2-digit indicator and item reference (7 bits)
GS1 Company Prefix 37 1011000100010000001001000001000111111 9506000134311 digits
Indicator and item reference 7 0000101 05Pad digit 0 (a GTIN-8, -12 or -13 has no indicator digit), then item reference 5
Serial number 38 00000000000000000000000001101010000101 678938-bit integer

The header 30 says the rest is an SGTIN-96 (TDS 2.3 Table 14-1). The 3-bit filter value helps readers pick out tags, and the 3-bit partition says where the company prefix ends. The company prefix and the indicator digit and item reference are two binary integers that always share 44 bits between them, and the serial is a 38-bit integer (§14.6.1, Table 14-17). Read the 96 bits as hex, four bits per character, and you have the EPC your readers report.

The partition table

Company prefixes come in different lengths, so the partition value tells a decoder how the 44 bits are split. Count the digits of the GS1 Company Prefix, not of the GTIN, and take the row with that length (TDS 2.3 Table 14-16). “Item ref.” is the indicator digit and the item reference together:

PartitionPrefix digitsPrefix bitsItem ref. digitsItem ref. bits
0124014
1113727
21034310
3930414
4827517
5724620
6620724

The GTIN cannot tell you the length, because the same 13 digits can be split after the sixth digit or after the twelfth. That is why the tool asks for it. A wrong length does not fail: it produces a different, valid-looking EPC whose URI no longer matches the one your trading partners expect.

Filter values

The filter value lets a reader select, for example, the one pallet tag among hundreds of item tags. It is control information, not part of the EPC: the pure identity URI leaves it out, and two items must never carry the same EPC even with different filter values (TDS 2.3 §10). The SGTIN values are (Table 10-1):

ValueMeaning
0All Others
1Point of Sale (POS) Trade Item
2Full Case for Transport
3Reserved (for GS1 to assign later; do not write it to tags, §10.1)
4Inner Pack Trade Item Grouping for Handling
5Reserved (for GS1 to assign later; do not write it to tags, §10.1)
6Unit Load
7Unit inside Trade Item or component inside a product not intended for individual sale

Use the value that describes the tagged object; the standard’s example uses 3, a reserved value. If your retailer or trading partner publishes a tagging guideline, it says which value to use.

Serial numbers

An SGTIN-96 serial is a whole number from 0 to 274,877,906,943 (238 − 1), with no leading zeros (TDS 2.3 §14.6.1). If every serial must have the same number of digits, start from a power of ten: for 12-digit serials, use 100,000,000,000 to 274,877,906,943 (§12.3.1). A serial with letters, symbols or leading zeros needs SGTIN-198 or a newer TDS scheme such as SGTIN+, which this tool does not encode.

Whether serials run in sequence or are drawn at random, and which range each supplier or production run uses, is the brand owner’s decision or the retailer programme’s rule. Whatever the policy, a GTIN and serial identify one item only: never issue the same pair twice, across suppliers and across orders.

Pure identity URI or tag URI?

The pure identity URI, urn:epc:id:sgtin:…, is the EPC itself: company prefix, item reference and serial (TDS 2.3 §6.3.1). It is the form recommended for business applications and the “what” of EPCIS visibility data (§3); since EPCIS 2.0, a GS1 Digital Link URI such as https://id.gs1.org/01/09506000134352/21/6789 is accepted as an equivalent (§4.4, Table 14-17). The tag URI, urn:epc:tag:sgtin-96:…, adds the filter value and names the 96-bit coding scheme, so it describes what is written to the tag (§12). For an SGTIN-96 without other control fields, converting one to the other adds or removes just those two details (§12.3.2 and §12.3.3).

GTINs that cannot become an SGTIN

A GTIN-8 is encoded with an 8-digit company prefix made of five zeros and the GTIN-8’s first three digits (§7.3.2). The standard excludes some number ranges from SGTINs altogether, and the tool refuses them (§7.3.3 to §7.3.7): restricted circulation numbers (RCN-8, and GS1 prefixes 02 and 20 to 29, used for example for variable-measure items), company internal numbering (04 and 0001 to 0007), coupons (981 to 984 and 99) and refund receipts (980). It also refuses ISSNs, the GTINs of serial publications (977), because an SGTIN cannot currently be made from one (§7.3.8.2). ISBNs and ISMNs (978 and 979) can be encoded (§7.3.8.1).

Writing the EPC to a tag

The hex is the content of the tag’s EPC memory bank from bit 20h onward. The protocol control (PC) word in front of it declares the EPC length, which for 96 bits is six 16-bit words, and the CRC before that is normally calculated by the reader (TDS 2.3 §15.1.1, Table 15-1). The length in the PC word tells the tag how many 16-bit words of EPC to send when a reader inventories it (Gen2 standard §6.3.2.1.2.2), so check it when you write 96-bit EPCs yourself. The four memory banks of a UHF tag are explained in RFID Data Encoding and Memory Structures.

Other 96-bit GS1 schemes

The same header-first layout carries other GS1 keys, each with its own header: 31 for SSCC-96, 32 for SGLN-96, 33 for GRAI-96 and 34 for GIAI-96 (Table 14-1). SSCC-96 identifies a logistic unit such as a pallet, SGLN-96 a location, GRAI-96 a returnable asset and GIAI-96 an individual asset. This tool encodes and decodes SGTIN-96 only; paste another scheme into Decode and it names the scheme from its header. Which scheme fits each level of a supply chain is covered in RFID Supply Chain Management: Tags, Encoding and EPCIS.

Questions about SGTIN-96 encoding

Where do I find the length of my GS1 Company Prefix?

Ask the GS1 Member Organisation that licensed the prefix, or the brand owner whose GTINs you are encoding. If your GS1 Member Organisation issued you individual GTINs rather than a company prefix, the prefix length is 12 (TDS 2.3 §7.2.1). The GTIN itself does not show where the prefix ends: in an SGTIN-96 it can be 6 to 12 digits, and the standard says the length has to be looked up, for example in a table of company prefixes (TDS 2.3 §7.3). A wrong length still gives a valid-looking EPC, but it splits the digits differently, so its URI will not match the one your trading partners expect.

Why does the tool refuse my serial number?

An SGTIN-96 serial is a whole number from 0 to 274,877,906,943, written without leading zeros (TDS 2.3 §14.6.1). A serial with letters, symbols or leading zeros needs SGTIN-198, which takes up to 20 characters, or one of the newer TDS schemes such as SGTIN+. SGTIN-198 needs at least 198 bits of EPC memory, so a chip with a 96-bit or 128-bit EPC cannot hold it; the chip table on the UHF RFID labels page lists chips with up to 496 bits of EPC memory for it. SGTIN+ varies in length with the serial, up to 216 bits (§14.6.1.3), so the EPC memory it needs depends on your serials.

Which filter value should I use?

The value that describes the tagged object: 1 for a point-of-sale item, 2 for a standard case, 4 for an inner pack, 6 for a unit load (TDS 2.3 Table 10-1). If your retailer or trading partner publishes a tagging guideline, follow it. Avoid 3 and 5, which GS1 reserves. The filter only helps readers select tags; it is not part of the EPC.

Can I check EPCs that someone else encoded?

Yes. Switch to Decode and paste the 24 hex characters your reader or printer reports for the EPC bank. The tool shows the GTIN, serial, filter value and company prefix length, and names the scheme when the header is not SGTIN-96, for example 31 for SSCC-96. A value starting with E2 is not a GS1 EPC: it is the tag’s TID, or a factory EPC that some chips copy from the TID until they are encoded.

Does this tool send or save what I enter?

No. The EPCs and the CSV are made by a script in this page: nothing you enter is sent to us or anyone else, saved in browser storage or added to the quotation links. Your browser saves the CSV like any other download. If you want us to encode your labels, send your EPC list or serial plan in your inquiry yourself. The analytics and cookie settings that apply to every page of this site are described in the privacy policy.

Sources

  • GS1, EPC Tag Data Standard, Release 2.3, ratified October 2025: §3 and §4.4 (where the pure identity URI and the GS1 Digital Link URI are used), §6.3.1 (SGTIN), §7.2.1 (individually assigned GTINs), §7.3 (GTIN and SGTIN, check digit, GTIN-8 and excluded GS1 prefixes), §7.3.8 (ISBN, ISMN and ISSN), §10.1–10.2 and Table 10-1 (filter values), §12.3 (EPC tag URI and pure identity URI), §14.2 and Table 14-1 (headers), §14.3–14.4 (encoding and decoding methods), §14.6.1 and Tables 14-16 and 14-17 (SGTIN partition table and SGTIN-96 coding table), §14.6.1.3 (SGTIN+), §15.1.1 and Table 15-1 (EPC memory bank), Appendix E.1 (worked example).
  • GS1, EPC Radio-Frequency Identity Generation-2 UHF RFID Standard, Release 3.0.1, ratified February 2026: §6.3.2.1.2.2 (the EPC length in the protocol control word).

Related pages

WhatsApp