CBOR / MessagePack Converter

Convert JSON to CBOR or MessagePack for API debugging. Decode Hex, Base64, Base64URL or binary files, then copy or download results locally in your browser.

Up to 1 MiB per input. One value per conversion.

Processed on your device. Nothing is uploaded or saved.

Formats and type fidelity

Hex, Base64 and Base64URL represent bytes; they are not additional serialization formats. JSON numbers use IEEE 754; integer literals keep every digit.

Typed output: $binary (Base64), $integer (decimal string), $float (NaN, Infinity, -Infinity or -0), $undefined, $cborTag ([number, value]), and $msgpackExt ([type, Base64]). These wrappers are tool conventions, not standard JSON types.

Extended JSON reserves objects with a single wrapper key. Keep it off for literal JSON objects containing those keys. CBOR maps with non-string keys or wrapper-shaped objects are shown as $map entry pairs.

Re-encoding preserves supported values, not necessarily identical bytes. CBOR simple values and indefinite-length strings are unsupported. MessagePack maps require string keys; duplicate keys are rejected. Streams and schema-based formats are outside this tool.

Inspect binary API payloads

CBOR and MessagePack are compact binary serialization formats for structured data. Use this converter to inspect API responses, WebSocket messages, or cached values as JSON, or create binary payloads from JSON for debugging. Everything is processed in your browser; inputs are not uploaded or saved.

Encode JSON or decode bytes

Choose the binary format and conversion direction. To encode, enter JSON and choose Hex, Base64, or Base64URL for the output. To decode, paste bytes and select their input encoding. Changing the input encoding reinterprets the text already in the editor.

Open a JSON file when encoding, or a raw .cbor, .msgpack, or .bin file when decoding. Encoded text such as Hex or Base64 should be pasted into the editor. Convert, then copy the displayed text or download the result. Binary downloads contain the actual bytes and can be imported again.

Preserve values and understand the limits

Integer literals keep every digit within the format’s supported 64-bit range. Values JSON cannot represent, such as binary fields, CBOR tags, and MessagePack extensions, appear as explicit typed wrappers. Enable Extended JSON to encode those wrappers back into binary; leave it off for ordinary JSON objects that happen to use wrapper keys.

For example, with Extended JSON enabled, {"id":{"$integer":"9007199254740993"},"data":{"$binary":"AQI="}} encodes an exact integer and two binary bytes.

Each conversion handles one value, with an input limit of 1 MiB. Formatted JSON bytes counts the displayed, pretty-printed JSON rather than the original input. Re-encoding preserves supported values but may change map ordering or the choice of binary encoding. Open “Formats and type fidelity” above for wrapper syntax and unsupported types.