Decode MessagePack data

Decode MessagePack bytes into nested values and identify each binary type prefix.

freeworks offlinenothing uploaded
ToolMessagePack Viewer
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

The first byte selects a compact integer, string, array, map, float, binary, or extension format, and length bytes determine the payload size. Supported arrays and maps are decoded recursively until their declared contents end.

  • Hex is used because MessagePack is binary.
  • Recursive decoding follows the format’s explicit lengths.

Worked example

Decode fixmap with string key-value pair
Decode a base64-encoded MessagePack map containing {"name":"Alice"}
Input
											gaRuYW1lpUFsaWNl
										
Output
												Hex: 81 a4 6e 61 6d 65 a5 41 6c 69 63 65
Byte length: 12
Format: Fixmap (1 elements)

DECODED
Name: Alice
											

When to use this

Game packets, service caches, and protocol captures use compact MessagePack payloads.

Edge cases

  • A declared string or map length beyond remaining bytes is truncated and fails.
  • Extension records retain application-defined type data instead of being guessed.
  • Unsigned 64-bit values can exceed JavaScript Number’s exact range.

References