← All text tools

MessagePack, CBOR and BSON Decoder

Decode MessagePack, CBOR or BSON from hex or base64 into readable JSON, and encode JSON back into the chosen binary format.

  • Free
  • No sign-up
  • Works on any device

About MessagePack, CBOR and BSON Decoder

MessagePack, CBOR and BSON are compact binary cousins of JSON used in APIs, IoT devices and databases. This page decodes their bytes, pasted as hex or base64, into indented JSON, and encodes JSON back into the chosen format. Integers are stored in their smallest form, CBOR floats in the shortest exact form, and special types such as byte strings, tags, ObjectIds and dates are shown as small marker objects. Example: the MessagePack bytes 81 A1 61 01 decode to the object {"a": 1}.

How to use MessagePack, CBOR and BSON Decoder

  1. Choose MessagePack, CBOR or BSON and the direction.
  2. Paste hex or base64 bytes to decode, or JSON to encode, or press Load a sample.
  3. Copy the JSON or the encoded bytes, or download the bytes as a file.

Why use this tool?

Also known as

Frequently asked questions

How does the page tell hex from base64 input?

Text made only of hex digit pairs is read as hex, anything else as base64. If a base64 string happens to look like hex, pick Base64 yourself in the list.

Why do some decoded values look like {"$bytes": ...}?

JSON has no type for raw bytes, tags or ObjectIds. The page writes them as marker objects such as $bytes, $tag, $oid and $date so that no information is lost.

Can it decode several MessagePack values in a row?

It decodes the first value and tells you how many bytes are left over, with a preview of them. Cut the stream at that point to decode the next value.

Is MessagePack, CBOR and BSON Decoder free?

Yes. MessagePack, CBOR and BSON Decoder on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.