Binary format decoder
Decode MessagePack, CBOR (with tags), protobuf (with or without a .proto), BSON, and Python pickle opcodes into an annotated tree and hex view; encode JSON as MessagePack or CBOR.
Added · updated 28 October 2026
Works with
- Protobuf and gRPC playground Encoding and textopens its encoded bytes here as hex
- Packet capture viewer (mini Wireshark) Networksends an MQTT, UDP or HTTP payload from a capture here to decode
How to use it
Decoding
Paste bytes as hex (spaces, colons, and 0x are fine) or base64, or open a file. Auto
guesses the input encoding, and the format can be detected or chosen. Each decoded value is
a node in the tree. Click it to highlight its exact bytes in the hex view. A decoding error
marks the byte where it happened.
-
MessagePack: all types, including ext and timestamps.
-
CBOR (RFC 8949): indefinite lengths, half floats, simple values, and common tags such as date/time, bignums, decimal fractions, URIs, embedded CBOR, and self-describe.
-
Protobuf without a schema shows field numbers and wire types. Length-delimited fields are shown as a nested message, a string, or packed numbers when they parse as such. Varints show their unsigned, signed, and zigzag readings. Paste a
.protoand choose the message to get field names, enums, and the right scalar types. -
BSON: documents and arrays, ObjectId (with its timestamp), dates, binary, decimal128, and the rest.
-
Pickle is listed as opcodes only. Nothing is executed.
GLOBAL/STACK_GLOBALandREDUCEare flagged, because unpickling those runs code.
Encoding
Encode turns JSON into MessagePack or CBOR (using the smallest integer encodings) as hex, base64, or a download. Decode it opens the result in the decoder to check it. The Varint tab converts numbers to and from LEB128 varints and zigzag form.
Sharing
Share link copies a URL that opens this tool exactly as configured. ?data= (hex or base64) with fmt and inMode for Decode, the JSON for Encode, or ?vi= for Varint.
For example: binary-formats/?vi=300.
Feedback is a gift. Something to improve, a feature to add, or a bug? Tell me.
Runs entirely in your browser; nothing you type leaves this page.