EPC Decoder
Decode an EPC hex string and extract all fields
What Is an EPC Decoder?
An EPC decoder reverses the encoding process: it takes the 24-character hexadecimal string stored on a Gen 2 UHF RFID tag and extracts the original GS1 company prefix, item reference and serial number. Decoding an EPC is an essential skill for RFID developers troubleshooting tag populations, auditing warehouse inventories, or integrating RFID readers with ERP and WMS platforms.
This free online SGTIN-96 decoder runs entirely in your browser — no data is sent to a server and there is no rate limit. Paste the hex string and the decoded fields appear instantly.
How to Decode an EPC Hex String
Paste the hex string in the input field. Accepted formats include space-separated bytes, continuous uppercase hex, or lowercase. The decoder normalises all three. Click Decode to extract: the EPC scheme, filter value, company prefix, item reference, serial number, Tag URI and Pure Identity URI.
The 96-Bit EPC Binary Structure
Under the hood, the decoder converts the 12-byte hex string to a 96-bit binary number and slices it according to the SGTIN-96 specification:
| Bits | Field | Value / Description |
|---|---|---|
| 0–7 | Header | Must be 00110000 (0x30) |
| 8–10 | Filter | Supply chain level (0–7) |
| 11–13 | Partition | Determines company prefix digit length |
| 14–57 | Company + Item | 44 bits split by partition table |
| 58–95 | Serial | 38-bit unique item identifier |
Reading the Partition Table
The partition field (3 bits, values 0–6) encodes the digit length of the company prefix. Partition 5 means the company prefix is 7 digits long, and the 44-bit combined field is split 24 bits for the prefix and 20 bits for the item reference. If the decoded company prefix has fewer digits than expected, check for missing leading zeros — GS1 company prefixes must always preserve their declared digit length.
Colour-Coded Binary Breakdown
The decoder displays the full 96-bit binary string with each field highlighted in a distinct colour: amber for the header, blue for the filter, purple for the partition, green for the combined company+item field, and grey for the serial number. This visual breakdown lets you manually verify the partition split and confirm each field contains the expected value — without needing to write a decode script or consult the GS1 TDS documentation.
SGTIN-96 vs. Other EPC Schemes
SGTIN-96 (header 0x30) is by far the most common EPC scheme in retail, apparel and pharmaceutical tagging. Other EPC schemes use different header bytes:
- SSCC-96 — Serial Shipping Container Code, for logistics units such as pallets and cases
- SGLN-96 — for locations (dock doors, storage cells, read zones)
- GRAI-96 — for returnable transport items and reusable assets
- GIAI-96 — for individual assets like equipment and fixtures
This decoder is specialised for SGTIN-96. If your tag uses a different header byte, the decoder reports an unsupported format error.
Common EPC Decoding Errors
- Invalid EPC header — the first byte is not 0x30. Your tag may use a different EPC scheme, or the hex string may be truncated.
- Wrong input length — a 96-bit EPC is exactly 12 bytes = 24 hex characters (spaces are ignored during length counting).
- Unknown partition — partition 7 is reserved and currently undefined. Valid partitions are 0–6.
- Non-hex characters — only 0–9 and A–F (case-insensitive) are valid. Verify your reader middleware is not appending metadata characters to the EPC field.
Use Cases for EPC Decoding
- RFID integration testing — verify that encoded tags contain the correct company prefix and item reference before go-live.
- Returns processing — decode the EPC from a returned item to confirm product identity and check previous serialisation records.
- Counterfeit detection — if the company prefix decoded from a tag does not match the brand owner's registered GS1 prefix, the product may be counterfeit or mislabelled.
- Middleware debugging — capture raw hex from reader firmware logs and decode manually to diagnose encoding pipeline errors without deploying new code.
- Audit and compliance — generate human-readable decoded EPC records for regulatory inspection, customer audits or supply chain traceability documentation.