Protobuf, MessagePack & CBOR Decoder Online
- This tool runs entirely in your browser. Nothing you enter or upload is sent to a server.
Bytes (hex or Base64)
Paste, type or drop a file
Decoded
Paste bytes to decode them
Paste or type on the left, upload a file, or drop one onto the input.
See also
About this tool
Protocol Buffers, MessagePack and CBOR are compact binary formats. They are smaller and faster to parse than JSON, which is why gRPC services, Redis clients, game servers, IoT devices and passkey login all use them, but the bytes are unreadable on their own. Paste them as hex or Base64, or open a binary file, and this decoder prints what is inside, with the format chosen at the top.
The same record, {"name": "Ada", "age": 36, "tags": ["math", "code"]}, takes 46 bytes as compact JSON, 31 bytes in MessagePack and 32 bytes in CBOR; press Sample on the MessagePack or CBOR tab and it decodes back to exactly that. The Protobuf sample is 19 bytes, 0a 07 74 65 73 74 69 6e 67 10 96 01 1a 05 0a 03 61 62 63, which reads as field 1 = "testing", field 2 = 150 and field 3 containing a message with field 1 = "abc".
MessagePack and CBOR describe their own types, so they decode completely, including integers up to 64 bits shown exactly, raw bytes as h'cafe', CBOR tags such as epoch dates and big numbers, and MessagePack timestamps. Protocol Buffers does not: the data holds field numbers and wire types, not names. Like protoc --decode_raw, the tool shows 1: 150 and adds a comment with other readings, such as a signed (zigzag) value or a float, and it shows a length-delimited field as text, a nested message or hex, whichever fits. For field names you need the .proto file.
Only the first value is decoded, and a warning appears if bytes are left over, which usually means the wrong format was chosen. An error names the byte offset where decoding failed. Files up to 256 KB can be opened. Everything runs in your browser and nothing is uploaded. To read the Base64 itself, use the Base64 tool, and to tidy the result as JSON, the JSON Formatter.
| Format | Defined by | Describes its own types | Common uses |
|---|---|---|---|
| Protocol Buffers | Google (.proto files) | No, a schema supplies names | gRPC, internal services |
| MessagePack | msgpack.org specification | Yes | Redis clients, RPC, game networking |
| CBOR | RFC 8949 | Yes | IoT, passkeys (WebAuthn), COSE and CWT tokens |
| Encoding | Size |
|---|---|
| JSON (compact text) | 46 bytes |
| MessagePack | 31 bytes |
| CBOR | 32 bytes |
Frequently asked questions
Can Protobuf be decoded without the .proto file?
Partly. The wire format carries field numbers and wire types, so the structure and values can be read, but not field names or the exact type, for example whether 150 is an int32, a uint64 or an enum. The tool shows the structure and likely readings.
How can I tell which format my bytes are in?
Try each tab: the wrong one usually fails quickly or leaves bytes over. Clues: a MessagePack map starts with 0x80 to 0x8f or 0xde, a CBOR map starts with 0xa0 to 0xbf, and Protobuf usually starts with a field tag such as 0x08 or 0x0a. MessagePack never uses the byte 0xc1, and Protobuf has no wire types 6 or 7.
Why does a number have a comment like “sint -75”?
Protobuf can store signed numbers in zigzag form (sint32 and sint64), where odd values stand for negatives. The wire format cannot say which was used, so the comment shows the other reading, and you pick the one that matches your schema.
Should I paste hex or Base64?
Either. Auto-detect reads spaces, colons and 0x prefixes as hex first, then Base64 or Base64URL. A string made only of hex digits is read as hex, so switch to Base64 if that is wrong.
Can I decode a WebAuthn or passkey response?
Yes. The attestation object and the COSE public key inside it are CBOR. Paste the Base64URL value on the CBOR tab to see the map of keys and the raw bytes.
Is my data uploaded?
No. Decoding happens in your browser, and neither pasted bytes nor opened files leave your device.