HomeMessagePack Encode/Decode

MessagePack Encode/Decode

Online MessagePack encode/decode tool with JSON conversion, hex/Base64/C-array output, and byte viewer for protocol analysis, IoT debugging, and binary payload troubleshooting.

Paste MessagePack bytes from packet capture, device logs, or API payloads.

Click to insert sample data

Decoded Result

Enter MessagePack data to decode and view result

MessagePack Protocol Guide

What is MessagePack

MessagePack is an efficient binary serialization format designed to keep a JSON-like data model while reducing payload size and improving parse speed. It is widely used in network protocols, embedded devices, and high-throughput services.

Encoding Structure

The first byte identifies both type and length strategy. Some types embed value or length directly in the first byte, while others use 1/2/4/8 following bytes.

Format ByteMeaning
0x00-0x7fpositive fixint (0 to 127)
0x80-0x8ffixmap (0 to 15 key-value pairs)
0x90-0x9ffixarray (0 to 15 items)
0xa0-0xbffixstr (length 0 to 31)
0xc0nil
0xc2/0xc3false/true
0xcc-0xcfuint8/16/32/64
0xd0-0xd3int8/16/32/64
0xdc/0xddarray16/array32
0xde/0xdfmap16/map32

MessagePack Data Type Reference

TypeFormat BytesDescription
Positive Integer (fixint/uint)00-7f / cc-cfNon-negative integer with size-based encoding
Negative Integer (fixint/int)e0-ff / d0-d3Signed integer with 8/16/32/64-bit variants
Floating Pointca/cb32-bit or 64-bit IEEE 754 float
Stringa0-bf / d9-dbUTF-8 text using fixstr/str8/16/32 by length
Binaryc4-c6Raw byte sequence using bin8/16/32
Array90-9f / dc-ddOrdered items using fixarray/array16/array32
Map80-8f / de-dfKey-value object using fixmap/map16/map32
Extensiond4-d8 / c7-c9Custom typed payload; type -1 is commonly timestamp

MessagePack vs JSON

Both formats represent similar logical structures. MessagePack optimizes binary transfer efficiency, while JSON focuses on text readability and manual editing.

MessagePack Advantages
  • Smaller payloads and lower network overhead
  • Fast encode/decode for high-throughput workloads
  • Binary-friendly format with protocol extension capability
  • JSON-like structure with low migration cost
JSON Advantages
  • Human-readable and easy to debug
  • Broad ecosystem and language support
  • Directly suitable for logs and config files

Common Use Cases

  • High-frequency messaging between IoT devices and gateways
  • Binary RPC transport between microservices
  • Game server state sync and event broadcasting
  • Compact data exchange in edge computing nodes
  • Payload-sensitive mobile network requests

Extension Type (Ext)

Ext allows custom semantics beyond built-in types. By common convention, ext type = -1 is used for timestamp, while other type ids are application-defined.

Ext TypeMeaning
-1Timestamp extension type (common convention)
0Application-defined extension type
1-127Reserved positive type range by protocol
-128--2Reserved negative type range by protocol

Data is processed locally in your browser by default and will not be uploaded to any server. Upload will be clearly indicated if required.

© 2026 See-Tool. All rights reserved. | Contact Us