How to use the Protobuf decoder
- Paste the message as hex (
08 96 01) or Base64 into the left pane. - Input: Detect, Hex or Base64.
- Varints: Unsigned (the default), Signed (int64) or ZigZag (sint).
- Show wire types: turns keys like
"1"into"1 (varint)","2 (string)","3 (message)". - Under More options, Fixed 32/64-bit reads fixed32/fixed64 fields as integers or as float/double.
Example
0a 03 4c 61 6e 10 96 01 1a 0f 6c 61 6e 40 65 78 61 6d 70 6c 65 2e 63 6f 6d
22 10 0a 0c 30 39 30 31 20 32 33 34 20 35 36 37 10 01
decodes to
{
"1": "Lan",
"2": 150,
"3": "lan@example.com",
"4": { "1": "0901 234 567", "2": 1 }
}
0a is field 1 with wire type 2 (length-delimited), 10 96 01 is field 2 as a varint (150, the classic example from the protobuf encoding guide), and field 4 is a nested message.
What it understands
- Varint (wire type 0): up to 64 bits, exact; as unsigned, int64 or zigzag sint.
- I64 / I32 (wire types 1 and 5): fixed64, sfixed64, double, fixed32, sfixed32 and float, little-endian.
- LEN (wire type 2): strings, bytes, nested messages and packed repeated fields.
- Groups (wire types 3 and 4): the deprecated proto2 groups, decoded as nested objects.
A field that appears more than once becomes an array, which is how repeated fields look on the wire.
When it helps
Inspect a gRPC payload captured with a proxy, a Firebase or Google API response, a message stored in Kafka or a database column, or a cookie that turns out to be protobuf. Combine it with the Base64 tool for URL-safe Base64, explore the output with the JSON Viewer, and check odd numbers with the Number Base Converter. For other binary formats, see MessagePack to JSON and CBOR to JSON.
Reading the result
Field numbers match the numbers in a .proto file, so if you have the schema, map them by hand: string name = 1; is key "1". A varint of 0 or 1 is often a bool or an enum. Large values in fixed64 fields are frequently timestamps or IDs.
Limits and safety
Without a schema, packed repeated fields and some bytes fields can’t be told apart from strings or messages, so the decoder says so in a note. Corrupt data gives an error with the byte offset; a forged length longer than the data is refused, and nested messages deeper than 100 levels are shown as bytes instead of being followed.
Frequently asked questions
Do I need the .proto file?
No. The decoder reads the wire format directly, so you see field numbers and values without a schema. Names come from the .proto file, so they are not available; you get {"1": …, "2": …} instead, and types are inferred from the wire type.
Why is a field shown as a nested object, a string or hex?
Length-delimited fields can hold strings, bytes, nested messages or packed repeated values, and the wire format doesn't say which. The decoder shows printable UTF-8 as a string, otherwise tries a nested message that must parse completely, and falls back to hex bytes.
My negative number shows as 18446744073709551615. Why?
int32 and int64 fields store negative numbers as 10-byte two's complement varints. Set Varints to Signed (int64) to see -1, or to ZigZag (sint) for sint32/sint64 fields.
Can it decode gRPC messages?
Yes, the message bytes. A gRPC frame starts with a 5-byte prefix (a compression flag and a 4-byte length); remove those first, then paste the rest.
Is my data uploaded?
No. Decoding happens in your browser.
Last updated