MsgPack Inspector — Decode and Encode MessagePack Binary
Decode and encode MessagePack binary with hex view. Inspect packed data structures byte by byte — runs in your browser, no upload.
MsgPack Inspector
Decode .msgpack to JSON, encode JSON to MsgPack, view hex + decoded side-by-side. Runs locally.
Drop a .msgpack file
Or encode JSON → MsgPack
MessagePack is the binary serialisation format that powers the internal plumbing of much of the modern web. Redis uses it for Lua script responses. Fluentd serialises log records in MessagePack before forwarding them to aggregators. Nginx’s upstream module can speak MessagePack to backend services. Game engines use it for network packets because every byte counts when you are sending 60 updates per second. The format is compact, fast to parse, and supported in over 50 languages — but a MessagePack binary is opaque to a human looking at it in a hex editor. The inspector bridges that gap by decoding the bytes into a navigable JSON tree with byte-level annotations.
The format’s cleverness is in its prefix byte system. A single byte at the start of each value tells the decoder what comes next: 0x00-0x7f are positive integers, 0xa0-0xbf are short strings (the remaining bits encode the length), 0x80-0x8f are small maps, 0x90-0x9f are small arrays. This means a large fraction of real-world MessagePack data decodes in a single pass with no lookahead, no backtracking, and no memory allocation for a schema. The inspector highlights these prefix bytes in the hex panel so you can read the format directly.
For debugging a service that speaks MessagePack, the inspector’s round-trip capability matters. You can capture a binary response from a network tab, decode it to see what the server returned, edit a suspect field, and re-encode to see what the corrected binary would look like. The hex panel shows both the original bytes and the re-encoded bytes side by side, with the changed bytes highlighted. This is the debugging loop that text-based formats give you for free and binary formats make you work for.
How to use
Paste hex or drop a binary file
Paste a hex string or drag a .msgpack binary file into the input. The tool decodes the MessagePack bytes into a readable JSON tree and shows the raw hex for each element side by side.
Explore the byte-level view
Click any value in the decoded tree to highlight its corresponding bytes in the hex panel. Integers show their fixint/uint/int format byte, strings reveal their length-prefix, and maps display their pair count.
Encode back to MessagePack
Edit the JSON tree and hit encode to produce a new MessagePack binary. The output is shown as hex and as a downloadable .msgpack file. Round-trip validation confirms the encode is lossless.
Frequently asked
Why use MessagePack instead of JSON?
MessagePack is a binary serialization format that typically produces payloads 30-50% smaller than equivalent JSON. It is used in Redis, Fluentd, Nginx, and game networking stacks. The trade-off is human readability — a MessagePack binary is not readable in a text editor, which is why an inspector is necessary.
How does the format handle integers differently from JSON?
MessagePack uses variable-length encoding: integers from 0-127 fit in one byte (positive fixint), integers up to 255 use two bytes (uint 8), and larger integers use more. JSON always stores integers as decimal strings. The inspector shows the exact byte-length of every integer value.
Can it decode a partial or truncated MessagePack stream?
The tool attempts a best-effort decode of the first complete object in a stream. If the stream is truncated mid-object, the decoder stops at the last valid byte and shows an error at the truncation point. For NDJSON-style MessagePack streams, use the NDJSON validator after splitting on object boundaries.
What's the difference between MessagePack and CBOR?
Both are binary JSON-like formats, but CBOR (RFC 8949) is an IETF standard designed for IoT and constrained devices, while MessagePack is community-driven and optimised for server-side use. CBOR handles 64-bit integers and binary strings natively; MessagePack uses extensions for those. This tool is MessagePack-specific.
Can I edit a value in the decoded tree and re-encode?
Yes. Every field in the decoded JSON tree is editable inline. Change a string, modify an integer, add a key to a map — hit encode and the tool produces a valid MessagePack binary with your changes. The round-trip integrity is verified automatically.
Limitations
- No streaming decodeThe tool decodes the entire binary into memory. For gigabyte-scale MessagePack streams processed incrementally, use a command-line decoder with streaming support.
- Extension types displayed as hexMessagePack extension types (format codes 0xc7, 0xc8, 0xc9) carry arbitrary binary payloads. The inspector shows them as hex blobs with the type number label but does not interpret them unless a known extension type (timestamp, UUID) is detected.
- No schema validationThe inspector decodes anything that is valid MessagePack. It does not validate against a schema or type definition. For schema-aware inspection, pair with a schema validator tool after decoding.
Platform notes
- macOS
- For command-line inspection, `msgpack-tools` (via Homebrew) provides `msgpack2json` and `json2msgpack`. The browser tool is the right pick for inspecting a MessagePack payload from a browser DevTools network tab.
- Linux
- The `python3-msgpack` package provides `msgpack2json` for CLI use. The browser tool adds the hex-view side panel and the inline editing capabilities that CLI tools lack.
- Web
- Runs entirely client-side. Binary data stays on your device.