MP Binary Serialization Utility

MessagePack Decoder

Use this MessagePack Decoder to convert hexadecimal MessagePack data into readable values. Decode integers, floating-point numbers, strings, binary data, arrays, maps, extension types and standard MessagePack timestamp extensions.

✓ FixInt / Integers ✓ Strings & Binary ✓ Arrays & Maps ✓ Extension Types ✓ Timestamp Extension
HEX
Decode MessagePack Hex
● Ready
Enter hexadecimal MessagePack bytes. Spaces, commas, colons, hyphens and 0x prefixes are accepted. Continuous hexadecimal input is also supported.
Decoder scope: this page decodes one complete MessagePack object. Extension values are preserved as extension type plus raw payload unless they use the standard timestamp extension type -1, in which case the timestamp payload is additionally interpreted.
MessagePack Decode Result Decoded
Readable MessagePack Value
Input Bytes
Top Format
Total Values
Maximum Depth
Arrays
Maps
Extensions
Timestamps
# Path Offset Prefix Format Value / Length Encoded Bytes
Byte-Level Decode Breakdown -
Readable MessagePack Decode
-

What Is a MessagePack Decoder?

A MessagePack Decoder converts compact MessagePack binary data into readable values. MessagePack is a binary serialization format designed to represent common data structures such as integers, floating-point numbers, strings, binary blocks, arrays, maps and extension values efficiently.

Unlike a text-based representation such as JSON, MessagePack uses type prefixes and binary payloads. Small integers, short strings, small arrays and small maps have dedicated fixed forms that can often store their type and size inside a single prefix byte.

MessagePack Format Families

Family Purpose Examples
Integer Signed and unsigned integers positive fixint, negative fixint, uint8–uint64, int8–int64
Float IEEE 754 numbers float32, float64
String UTF-8 text fixstr, str8, str16, str32
Binary Raw bytes bin8, bin16, bin32
Array Ordered values fixarray, array16, array32
Map Key/value pairs fixmap, map16, map32
Extension Application-defined typed binary payload fixext, ext8, ext16, ext32

These type families are part of the standard MessagePack format mapping. :contentReference[oaicite:1]{index=1}

Example: Decode 81 A1 61 01

81 A1 61 01

The first byte 81 is a fixmap containing one key/value pair. The next byte A1 is a fixstr containing one UTF-8 byte.

81 → fixmap → 1 pair A1 → fixstr → length 1 61 → "a" 01 → positive fixint 1 Decoded: {"a": 1}

Positive FixInt

Prefix values from 00 through 7F encode positive integers directly. No additional payload bytes are required.

00 → 0 01 → 1 2A → 42 7F → 127

This compact one-byte representation is one reason MessagePack can efficiently encode small integer values.

Negative FixInt

Prefix values from E0 through FF represent signed integers from −32 through −1.

FF → -1 FE → -2 E0 → -32

The decoder interprets these bytes as signed 8-bit values rather than treating them as the unsigned numbers 224 through 255.

MessagePack Unsigned Integers

Larger positive integers can use explicit uint8, uint16, uint32 or uint64 formats.

CC C8 CC → uint8 C8 → 200 decimal

The 16-, 32- and 64-bit integer payloads use network byte order.

MessagePack Signed Integers

Signed formats D0 through D3 provide int8, int16, int32 and int64 payloads.

D1 FF 38 D1 → int16 FF 38 → -200

The decoder uses exact integer handling for 64-bit values instead of passing all integers through JavaScript Number.

MessagePack Float32 and Float64

MessagePack defines explicit single- and double-precision IEEE 754 formats. The prefixes are:

CA → float32 CB → float64

For example:

CA 3F C0 00 00 → float32 → 1.5

MessagePack Strings

Strings contain UTF-8 text and can use fixstr, str8, str16 or str32 depending on the encoded byte length.

A5 68 65 6C 6C 6F A5 → fixstr → 5 bytes 68 65 6C 6C 6F → "hello"

The length refers to encoded bytes, not JavaScript character count. Invalid UTF-8 is reported as malformed string data.

MessagePack Binary Data

The bin family stores arbitrary bytes without claiming that they contain text.

C4 03 01 02 03 C4 → bin8 03 → 3-byte payload 01 02 03 → binary data

The decoder displays this as hexadecimal rather than converting arbitrary binary data into a string.

MessagePack Arrays

Arrays contain an ordered sequence of MessagePack values.

93 01 02 03 93 → fixarray → 3 elements Decoded: [1, 2, 3]

For arrays with more than 15 items, MessagePack provides array16 and array32 formats.

MessagePack Maps

Maps contain key/value pairs. Although strings are common keys, MessagePack does not restrict map keys to strings.

For that reason, the decoder preserves the readable representation of the actual key value instead of blindly treating every map as a normal JSON object.

MessagePack Nil and Boolean Values

Hex Value
C0nil / null
C2false
C3true

Prefix C1 is not a normal MessagePack value and is treated as a reserved/invalid format byte.

MessagePack Extension Types

Extension formats allow an application to associate a signed one-byte type identifier with a binary payload.

Extension = type ID + binary payload

The generic decoder displays extension type and raw bytes because the meaning of an application-defined extension cannot be inferred safely from its payload.

MessagePack Timestamp Extension

MessagePack defines timestamp as a predefined extension type using extension type -1. Common implementations recognize the timestamp extension separately from ordinary application extension values. :contentReference[oaicite:2]{index=2}

Three timestamp representations are defined with payload sizes of 4, 8 and 12 bytes. They provide different combinations of seconds range and nanosecond precision.

This decoder reports Unix seconds, nanoseconds and an ISO date preview when the timestamp falls within JavaScript Date’s representable range.

Timestamp 32 Format

A four-byte timestamp extension stores an unsigned 32-bit number of seconds since the Unix epoch with zero nanoseconds.

D6 FF xx xx xx xx D6 → fixext4 FF → extension type -1 4-byte payload → Unix seconds

Timestamp 64 Format

The eight-byte timestamp representation combines nanoseconds and seconds in a 64-bit payload. The upper 30 bits represent nanoseconds and the lower 34 bits represent seconds.

The decoder separates those fields using exact BigInt operations.

Timestamp 96 Format

The 12-byte timestamp representation uses a four-byte nanosecond value followed by an eight-byte signed seconds value.

This provides a much wider seconds range than the compact timestamp32 and timestamp64 representations.

FixStr, FixArray and FixMap

FixStr

The low five bits of the prefix contain a string length from 0 through 31.

FixArray

The low four bits contain an array length from 0 through 15.

FixMap

The low four bits contain a map pair count from 0 through 15.

FixInt

The integer value itself is encoded directly inside the single prefix byte.

MessagePack vs JSON

JSON

Human-readable text with objects, arrays, strings, numbers, booleans and null.

MessagePack

Binary representation with dedicated integer widths, raw binary data and extension types in addition to JSON-like structures.

MessagePack is often described as a compact binary alternative for JSON-like data, but its binary and extension types provide capabilities beyond standard JSON. :contentReference[oaicite:3]{index=3}

MessagePack Integer Precision

uint64 and int64 can exceed JavaScript Number’s exact integer range. This decoder uses BigInt for those values so the exact bits are preserved.

uint64 maximum: 18,446,744,073,709,551,615

The value is displayed exactly rather than rounded to the nearest representable floating-point number.

Malformed MessagePack Detection

Reserved C1 Prefix

C1 is rejected instead of assigned an invented value.

Truncated Integer

The input ends before all bytes required by the integer format are available.

Truncated String

The declared string length exceeds the bytes remaining in the input.

Invalid UTF-8

String payload bytes cannot be decoded as valid UTF-8.

Incomplete Map

A declared map does not contain all required keys and values.

Trailing Data

Bytes remain after the first complete object when single-object decoding is requested.

Common Uses for a MessagePack Decoder

API Debugging

Inspect binary MessagePack request or response payloads.

Network Analysis

Read MessagePack bytes captured from applications and protocols.

Serializer Testing

Verify whether generated bytes contain the expected values and container sizes.

Embedded Systems

Inspect compact binary data used where bandwidth or storage is limited.

MessagePack Decoder FAQs

What is MessagePack?
MessagePack is a compact binary serialization format supporting integers, floats, strings, binary values, arrays, maps and extension types.
How do I decode MessagePack hex?
Read the first format byte, determine its MessagePack type and any associated length, then decode the required payload bytes recursively for arrays and maps.
What does MessagePack 01 mean?
01 is positive fixint and directly represents decimal value 1.
What does MessagePack FF mean?
FF is negative fixint and represents signed value −1.
What does MessagePack C0 mean?
C0 represents nil, normally mapped to null in common programming environments.
What does MessagePack C3 mean?
C3 represents Boolean true.
What does MessagePack C2 mean?
C2 represents Boolean false.
Is MessagePack C1 valid?
C1 is reserved and is not a normal MessagePack value.
What is fixstr?
fixstr is the compact MessagePack string family whose prefix carries a UTF-8 payload length up to 31 bytes.
What is fixarray?
fixarray is the compact array representation for up to 15 elements.
What is fixmap?
fixmap stores maps containing up to 15 key/value pairs with the pair count encoded in the prefix.
Does MessagePack support binary data?
Yes. bin8, bin16 and bin32 store arbitrary byte sequences separately from UTF-8 strings.
Does MessagePack support 64-bit integers?
Yes. uint64 and int64 are defined MessagePack integer formats.
Does MessagePack support floating-point numbers?
Yes. CA represents float32 and CB represents float64.
What are MessagePack extension types?
Extensions associate a signed one-byte type identifier with binary payload data so applications can define additional semantics.
What extension type is MessagePack timestamp?
The standard timestamp extension uses type −1.
Can MessagePack maps have non-string keys?
Yes. MessagePack map keys are MessagePack values and are not restricted to strings.
Is MessagePack the same as JSON?
No. MessagePack can represent JSON-like structures in binary form but also supports raw binary data and extension values.
Can this decoder read exact uint64 values?
Yes. 64-bit integer calculations use BigInt so values outside JavaScript’s safe Number range are not rounded.

Decode MessagePack Hexadecimal Data

Paste MessagePack bytes to inspect compact integers, strings, raw binary payloads, arrays, maps, floating-point numbers, extension values and standard timestamp data with byte-level details.

Scroll to Top