Start a project

Tool 164 of 194 · Encoding

Protobuf, CBOR & MessagePack Decoder

Find out what's in a binary payload: paste the bytes and see every field, type and offset, with JSON out and protoc-compatible text.

Protobuf, CBOR & MessagePack Decoder

Bytes

Decoded

FieldTypeValueOther readingsWhere
protoc --decode_raw text, or CBOR diagnostic notation
As JSON

Without a schema, protobuf can't say whether a varint is an int, a bool or an enum, or whether a length-delimited field is a string or a nested message, so every reading is shown. The raw text matches protoc --decode_raw. Bytes in JSON are base64; 64-bit integers are strings, as in proto3 JSON.

01

What it does

Decodes protobuf wire format with or without a .proto, CBOR with diagnostic notation, and MessagePack, from hex or base64, into a field table and JSON.

  • Protobuf without a schema, printed exactly as protoc --decode_raw prints it
  • With a pasted .proto: field names, enums, maps, oneofs and packed fields, as proto3 JSON
  • Every reading of ambiguous fields: int, sint (zigzag), bool, double, fixed, string or nested message
  • CBOR (RFC 8949) with indefinite lengths, tags, half floats and diagnostic notation

02

Private by design

Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

03

What you get

A field table, protoc or CBOR diagnostic text, and JSON, with a Copy and a Download button on every result.

  • Protobuf
  • CBOR
  • MessagePack
  • Binary

Why it matters

Binary formats are compact and fast, and opaque when something goes wrong. A gRPC call returns bytes, a queue holds a MessagePack blob, a WebAuthn response is CBOR, and the only question is what's inside. Protobuf is the hardest: its wire format carries field numbers and four wire types, not names or real types.

This decoder reads each format byte by byte and shows every field with its offset. For protobuf without a schema it lists every plausible reading, and with a .proto it names each field and produces proto3 JSON. It was checked against the reference implementations, protoc, the Python protobuf library, cbor2 and msgpack, on several hundred random messages with no differences.

How to use it

  1. Paste the bytes as hex or base64.
  2. Leave the format on Detect, or choose it.
  3. For protobuf, paste the .proto and pick the message type to get names.
  4. Read the table, or copy the JSON.

FAQ

Can you decode protobuf without the .proto file?

Yes, the structure: field numbers, wire types and values. Names and exact types aren't in the bytes, so the decoder shows every possible reading.

Why does a field show as both a string and a message?

In the wire format both are length-delimited bytes. If the bytes also parse as valid fields, either reading is possible; the .proto settles it.

What is CBOR?

Concise Binary Object Representation (RFC 8949), a binary JSON-like format used in WebAuthn, COSE, IoT protocols and CWT tokens.

What is sint and zigzag encoding?

Protobuf's sint32 and sint64 map signed numbers to unsigned ones (0, -1, 1, -2 become 0, 1, 2, 3) so small negatives stay short. Plain int32 makes every negative number 10 bytes long.

Work with me

Want a site that gets these right?

I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

All developer tools · Back to leej.uk