MessagePack is a binary serialization format that encodes the same data model as JSON — maps, arrays, strings, numbers, booleans and null — but in a far more compact byte stream. It is widely used in RPC systems, Redis-based tooling, real-time game networking and high-throughput APIs where parsing speed and payload size matter. This viewer decodes raw MessagePack back into readable JSON so you can debug those payloads without writing a script every time.
How it works
MessagePack uses a single leading byte to select a format family, and the value or length follows:
- Small integers, strings, arrays and maps use compact “fix” forms: positive fixint
0x00–0x7f, negative fixint0xe0–0xff, fixstr0xa0–0xbf, fixarray0x90–0x9fand fixmap0x80–0x8f. - Longer strings, binary blobs, arrays and maps use
str,bin,arrayandmapmarkers with 8, 16 or 32-bit length prefixes. nil,falseandtrueare the single bytes0xc0,0xc2and0xc3, while floats use0xca(float 32) and0xcb(float 64).- Extension types (
fixextandext) carry an application-defined type code plus a payload — these are shown without losing data.
The decoder reads the leading byte, dispatches to the matching family, and recurses into nested arrays and maps until the whole stream is consumed.
Example
The hex 82 a1 61 01 a1 62 92 02 03 decodes to:
{
"a": 1,
"b": [2, 3]
}
82 is a 2-entry fixmap, a1 61 is the fixstr "a", 01 is the integer 1, a1 62 is "b", and 92 02 03 is a 2-element fixarray [2, 3]. Binary values appear as bin:0x… and extensions as ext(type=n):0x…. All decoding happens locally in your browser.
Common debugging scenarios
Redis payloads — many Redis libraries store objects as MessagePack. If you pull a raw value with redis-cli --raw or GETRANGE, paste the hex here to read the structure without starting a full client.
Network capture — if Wireshark or Chrome DevTools shows a WebSocket frame or HTTP/2 body you cannot read, export the bytes as hex and paste them. The field-by-field breakdown makes it easy to pinpoint which key in a deeply nested map has an unexpected value.
Extension type 1 (Timestamp) — the MessagePack spec defines ext type 1 as a nanosecond-precision timestamp. The viewer displays the raw payload so you can interpret the 4-, 8-, or 12-byte encoding. The 32-bit form stores seconds since the Unix epoch in the upper 32 bits, the 64-bit form adds nanoseconds in the lower 30, and the 96-bit form stores them separately.
Checking compactness — a key reason to prefer MessagePack over JSON is payload size. If you are debugging a performance regression, compare the byte length shown in the viewer against the equivalent JSON character count: MessagePack is typically 20–30% smaller on real objects.
Practical tips
- Accept both upper- and lowercase hex:
82A1and82a1are treated identically. - Spaces, commas, and a leading
0xin hex input are stripped automatically, so you can paste directly from a hex editor or log line. - Very large integers (beyond 2⁵³) display in JSON as rounded numbers. If you need exact 64-bit integer values, note the raw bytes shown in the decoder and interpret them separately.
- The viewer is entirely client-side — useful when inspecting credentials or PII in internal APIs, because nothing leaves your machine.