MessagePack ↔ JSON.
Decode MessagePack bytes to JSON and encode JSON to MessagePack, with binary, ext and timestamps.
Runs in your browserAbout MessagePack ↔ JSON
MessagePack ↔ JSON converts between JSON and MessagePack, the compact binary format used by Redis modules, Fluentd, SignalR, many game and IoT protocols and caches that want JSON's data model with smaller payloads. In decode mode, paste MessagePack bytes as hex or Base64 and get pretty-printed JSON; in encode mode, paste JSON and get the MessagePack bytes as hex or Base64 plus a downloadable .msgpack file. The canonical example {"compact": true, "schema": 0} is 27 bytes as JSON and 18 bytes as MessagePack: 82 a7 63 6f 6d 70 61 63 74 c3 a6 73 63 68 65 6d 61 00. The encoder always picks the smallest representation, fixint, int8 to int64 or float64, and keeps key order. Values that JSON cannot express are mapped to small wrapper objects: binary data becomes {"$binary": "<base64>"}, extension types become {"$ext": type, "data": "<base64>"}, and the standard timestamp extension (type −1) is shown as an ISO 8601 date with nanoseconds. Wrappers in your JSON are encoded back to the real bin and ext types, so round trips are lossless. 64-bit integers beyond JavaScript's safe range are kept exact instead of being rounded. Map keys that are not strings are shown as their JSON text. Common mistakes are pasting a Base64 payload while hex is selected, decoding a stream of several concatenated messages as one value (the tool detects this and shows an array), and assuming float32 values are exact. Decoding errors show the byte offset where the data ended or a reserved type byte appeared. Conversion runs in your browser.
How to Use
- Choose decode for MessagePack → JSON or encode for JSON → MessagePack.
- Paste hex or Base64 bytes (auto-detected), or JSON.
- Copy the result or download the .msgpack file.
Frequently Asked Questions
How are binary and extension values shown in JSON?
Binary data becomes {"$binary": "<base64>"} and extension types become {"$ext": <type>, "data": "<base64>"}. Timestamps (ext type −1) become {"$timestamp": "<ISO date>"}. Binary and ext wrappers are turned back into MessagePack types when you encode.
Are large integers safe?
Yes. 64-bit integers outside JavaScript's ±2^53 range are kept as exact digits in both directions instead of being rounded.
Why does my float look slightly different?
MessagePack float32 values have only about 7 significant digits, so 1.1 stored as float32 decodes to 1.100000023841858. The encoder writes float64 to avoid this.
Is my data uploaded?
No. Everything runs in your browser.
Related Tools
Decode raw Protocol Buffers messages from hex or Base64 without a .proto file.
Pretty print, minify, and validate JSON.
Convert PHP serialize() strings to JSON and JSON back to serialized PHP, objects and enums included.
Encode and decode Base64 strings.
Convert text to hexadecimal bytes and hex dumps back to UTF-8 text.
Decode, inspect, and verify JSON Web Tokens.