💾Protobuf Decoder Online - MessagePack, CBOR & BSON Viewer
Captured some gRPC / Protobuf bytes, found MessagePack in Redis, got CBOR from a device or a BSON dump from MongoDB? Paste it as hex (spaces, 0x and \x styles all work) or Base64, or open the file, and the format is detected for you. Without a schema, Protobuf is decoded straight from the wire format: field numbers and wire types, varints read as unsigned, signed int64 and zigzag (sint), fixed32/64 as integers and floats, and length-delimited fields tried as printable string, nested message and packed repeated values before falling back to bytes — with the other possible readings listed alongside, plus protoc --decode_raw-style text output. Paste a .proto file to decode with real field and enum names, including nested types, repeated, packed, map and oneof fields. MessagePack covers every type plus the timestamp extension; CBOR follows RFC 8949 with tags (dates, bignums, UUIDs, embedded CBOR), half-precision floats and indefinite-length strings, arrays and maps, and produces diagnostic notation; BSON handles ObjectId, dates, Decimal128 and binary and outputs Extended JSON. Results appear as a tree and as JSON: hover a node to highlight its bytes in the hex view, or click a byte to jump to its node; decoding errors point at the exact offset. It also works in reverse, encoding JSON to MessagePack, CBOR or BSON. Everything runs locally in your browser.
Free · No sign-up · Runs in your browserLast updated:
How to use Protobuf, MessagePack, CBOR & BSON Decoder
- 1Paste hex or Base64, or open a binary file
- 2Pick the format (auto-detected by default); for Protobuf optionally paste a .proto and choose the root message
- 3Explore the tree alongside the hex view and copy the JSON
FAQ
- Can I decode Protobuf without the .proto file?
- Yes. The wire format carries field numbers and wire types, so the structure can be fully recovered — just not the names or exact types. A varint could be an int, bool, enum or zigzag-encoded sint, and a length-delimited field could be a string, bytes, a nested message or a packed array. The tool shows the most likely reading and lists alternatives in grey. Paste the .proto for exact results.
- How do I decode captured gRPC traffic?
- Each gRPC message starts with a 5-byte frame header: a 1-byte compression flag and a 4-byte big-endian length. Strip those 5 bytes before pasting; if the flag is 1 the payload is also gzip-compressed and must be decompressed first. gRPC-Web text is the same after Base64 decoding.
- Why can the same bytes be detected as different formats?
- None of these formats has a magic number, and short inputs are often valid Protobuf, MessagePack and CBOR at the same time. Auto-detection prefers the one that decodes completely into the most sensible structure (BSON is easy thanks to its length header). If it guesses wrong, choose the format manually.
- How are big integers and binary data shown in JSON?
- Integers beyond JavaScript’s safe range (2^53) are output as strings so no precision is lost, and bytes are output as Base64 strings, matching Protobuf’s JSON mapping. BSON uses MongoDB Extended JSON — {"$oid": "…"}, {"$date": …}, {"$numberLong": "…"} — so types survive encoding back to BSON.