Hex / Binary Converter
Convert between hexadecimal and binary formats
Hex to Binary Converter for RFID and EPC
Hexadecimal and binary are the two number formats you encounter most often when working with RFID systems at a low level. EPC codes are stored on tags as 96-bit binary values and transmitted to reader software as 12-byte hexadecimal strings. This converter handles both directions instantly — type hex and see binary, type binary and see hex — with automatic conversion on every keystroke.
No button press required, no data sent to a server. The tool validates input as you type and displays byte count and bit width automatically.
How Hexadecimal Works in RFID Systems
RFID Gen 2 readers communicate with tags using the ISO/IEC 18000-63 air interface protocol. At the physical and protocol layers, everything is bits. However, because 96-bit binary strings are impractical for human reading and software APIs, readers expose tag memory as hexadecimal. A 96-bit EPC becomes exactly 24 hex characters (12 bytes × 2 hex chars per byte) — compact enough to display in a table row and paste into a URL or database field.
EPC Hex Format Explained
A well-formed SGTIN-96 EPC hex string looks like: 30 34 25 7B F7 19 4E 40 00 00 30 39
- 30 — the EPC header byte identifying the SGTIN-96 scheme
- 34 — encodes the 3-bit filter value and the first 5 bits of the company prefix
- The remaining 10 bytes encode the rest of company prefix, item reference and serial number
The space-separated notation (bytes separated by single spaces) is the convention used by most reader middleware, LLRP-based fixed readers, and EPCIS event logs. The compact notation (no spaces) is common in database primary keys and URL parameters.
From Bytes to Bits
Each hex digit represents exactly 4 bits. The conversion is deterministic and reversible: 0 → 0000, 1 → 0001, …, 9 → 1001, A → 1010, B → 1011, C → 1100, D → 1101, E → 1110, F → 1111. The byte 0x30 converts to 00110000, which in SGTIN-96 is the fixed header that identifies this as an SGTIN-96 encoded tag.
EPC 96-Bit Field Breakdown
When the tool detects exactly 24 hex characters (a 96-bit EPC), it automatically displays a colour-coded field breakdown:
| Colour | Field | Bits | Description |
|---|---|---|---|
| Amber | Header | 0–7 | Should be 00110000 for SGTIN-96 |
| Blue | Filter | 8–10 | 3-bit supply chain level |
| Purple | Partition | 11–13 | Determines prefix digit length |
| Green | Company + Item | 14–57 | 44-bit combined field |
| Grey | Serial | 58–95 | 38-bit unique item identifier |
This breakdown lets you manually verify tag encoding without running a full decode operation. It is particularly useful when inspecting raw reader output to quickly confirm that the header and partition bytes are correct before handing the EPC to your decode pipeline.
How to Use the Converter
Type or paste your hex string in the left panel. The tool strips whitespace, validates each character is a valid hex digit (0–9, A–F), checks that the byte count is even, and converts in real time. The right panel updates with the binary result formatted as groups of 8 bits per byte.
For binary-to-hex conversion, type in the right panel. The tool validates that only 0 and 1 characters are present, checks that the bit count is a multiple of 4, and reverse-converts to formatted hex. Both panels support copy buttons for quick transfer to other tools.
Practical Use Cases
- Manual tag verification — when reader software returns an unexpected EPC, converting to binary lets you visually inspect each field without writing a decode script.
- Protocol debugging — LLRP packet captures often contain tag inventory results in hex. Converting to binary helps identify bit-level errors in the company prefix or serial fields.
- Bit mask operations — access control and filtering rules in RFID readers use bit masks. Building and verifying masks is easier when you can see the binary representation of the EPC alongside the mask.
- Learning the SGTIN-96 standard — seeing the EPC as 96 individual bits, colour-coded by field, makes the abstract GS1 TDS specification concrete and immediately understandable.
- Custom encoding validation — if you use a proprietary encoding scheme on top of standard Gen 2 memory banks, converting raw memory hex to binary lets you verify custom field values against your own specification.