Ambimat GroupAmbimatAmbiSecureSIMAuthAmbiAutomationEngineering BlogAhmedabad · India · Est. 1981
Developer utility

Byte Offset Calculator

Paste hex bytes and read them back as an indexed offset table — decimal and hex offsets, selectable grouping, and a printable-ASCII preview. Then pick any slice and see its unsigned and signed value in both little-endian and big-endian. Built for APDU, TLV, and binary-protocol debugging.

Client-sideHex inLE / BE integers

Input

Offset table

Paste hex bytes to build the offset table.

Interpret a slice as an integer

Integer value

Parse some bytes, then choose a start and length.
All parsing, the offset table, and every integer interpretation run locally in your browser. Nothing is uploaded — safe for APDUs, keys, and sensitive byte strings.

What this tool does

A byte offset calculator answers the question every protocol engineer keeps asking while staring at a hex dump: which byte is at which position, and what does this run of bytes mean as a number? Paste a string of hex, and the tool produces a row-by-row table that pairs each group of bytes with its starting offset shown three ways — 0-based decimal, 0-based hexadecimal, and 1-based decimal — alongside a printable-ASCII rendering where any byte outside 0x200x7E appears as a dot. The total byte count is shown so you can confirm a length field at a glance.

Below the table, a second panel takes a start offset and a length and decodes that slice as an integer. It reports the unsigned value and the two's-complement signed value in both byte orders, using exact 64-bit arithmetic. Together the two panels turn a wall of hex into something you can navigate by position and read as values.

When to use it

Reach for it whenever you are debugging a length-prefixed or position-addressed binary structure. Typical cases: locating the Lc field and command data in an ISO 7816 APDU; confirming a two-byte SW1 SW2 status word; checking where a tag, length, and value sit inside a BER-TLV record; or reading a multi-byte counter or serial number out of a memory dump or NFC frame. Because grouping is selectable from 1 up to 16 bytes per row, you can line the view up with a 16-column hex editor or collapse it to one byte per row for fine-grained counting.

Input and output

The input is forgiving: it strips spaces, newlines, 0x prefixes, and : , ; separators before parsing, so traces copied from a card reader, a debugger, or a spec all work. The cleaned text must have an even number of hex digits and contain only 0–9 and a–f; anything else raises a specific inline error rather than guessing. The offset table output is plain monospaced text you can copy straight into a bug report. The integer panel echoes the exact slice it read, then the big-endian and little-endian values, so there is never ambiguity about which bytes produced which number.

Common mistakes

Related tools

Hex ↔ Bytes

Convert between hex, raw bytes, and text before measuring offsets.

Open Hex ↔ Bytes →

TLV parser

Break a BER-TLV blob into tag, length, and value to see the structure behind the offsets.

Open TLV parser →

Endianness converter

Flip byte order and view integers across widths in more detail.

Open Endianness →

More utilities

Parsers, decoders, and references for smart-card and FIDO engineers.

All resources →