Chris Collins

Tools · data

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

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 .proto and 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_GLOBAL and REDUCE are 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.

Runs entirely in your browser; nothing you type leaves this page.