MessagePack Converter
Decode MessagePack bytes into readable JSON, or encode JSON as MessagePack. Paste the bytes as hex or Base64 and see the decoded value, including binary data, timestamps and extension types. Encoding turns any JSON value into compact MessagePack bytes in the same formats.
Frequently asked questions
What is MessagePack?
MessagePack is a binary serialization format with the same data model as JSON: maps, arrays, strings, numbers, booleans and nil, plus binary data and extension types. It is usually smaller and faster to parse than JSON and is used by Redis, Fluentd and many RPC systems.
How do I paste the bytes?
Choose hex or Base64. Hex may contain spaces, colons or 0x prefixes, as copied from a hex dump or a debugger. Base64 may use the standard or the URL-safe alphabet.
How is binary data shown in the JSON?
JSON has no binary type, so binary values become an object such as {"$binary": "AQID"} with the bytes in Base64.
How are timestamps and extension types shown?
The MessagePack timestamp extension is decoded to an ISO 8601 date-time string. Other extension types become {"$ext": type, "data": "..."} with the type number and the bytes in Base64.
What about integers larger than JavaScript can hold?
64-bit integers outside the safe integer range of plus or minus 2 to the power of 53 are written as strings, so no digits are lost.
Why does decoding fail?
The bytes are not valid MessagePack, for example because the data is cut off, contains a reserved type byte or has extra bytes after the first value. The message gives the reason reported by the decoder.