Protobuf Decoder
Raw protobuf bytes as a readable field tree, with every reading of each value.
Try before you buy.
- Free preview: every count with the first fields of the tree (up to 10) and the first lines of the text or JSON output (up to 20).
- Locked until you unlock it: download and copy.
- Unlock: Pro pass, ₹179 for 30 days or ₹79 for 1 week, a one-time payment that never renews. Unlock: Pro pass, $5.99 for 30 days or $2.99 for 1 week, a one-time payment that never renews.
Ways to unlock shows how to get the full result.
Printing this result is locked in the free preview.
Schema (optional)
Fields
Preview
Locked in the free preview. Opens the ways to unlock this result.
Locked in the free preview. Batch runs unlock with a pass.
Locked in the free preview. Query results unlock with a pass.
About the Protobuf Decoder
Paste Protocol Buffers bytes as hex, Base64 or escaped text — or open a binary file — and see every field: its number, wire type, byte range and value. Without a schema each value is shown with all its reasonable readings: a varint as unsigned, signed and ZigZag; 32- and 64-bit values as integers and floating point; length-delimited data as a nested message, text, bytes or packed numbers, with the most likely reading first, where protoc --decode_raw shows only one.
Paste the .proto file as well and the tree is labelled: field names, enum names, nested message types, maps, packed repeated fields, oneofs, proto2 groups and the well-known types (Timestamp, Duration, wrappers, Any). The tool picks the message type that fits the data best, or you choose it. gRPC and gRPC-Web bodies are split into their frames first, compressed frames are decompressed, and trailers are shown. With a pass, the result can be copied as protobuf text format or as JSON. Nothing is uploaded.
Without a pass the result is a free preview: every count, with the first fields of the tree and the first lines of the text or JSON output. A Pro pass unlocks the whole result, with Copy and Download.
How to use it
- Paste the bytes into the box — hex (
0a 08 6f 72 …or a hex dump), Base64 (CghvcmRf…) or escapes (\n\x08ord…) — or open the binary file. The format is detected; you can also choose it. - Read the tree: each line shows the field number, the wire type, the value and other ways to read it. Nested messages open and close.
- For names and types, open Schema (optional) and paste the .proto file (several files may be pasted one after another). Leave Message type on Best match or pick the type.
- For gRPC or gRPC-Web captures, the frames are found automatically; choose the frame to decode.
- With a pass, or after unlocking this result, copy or download it as protobuf text format or JSON.
Examples
08 96 01
1: 150
08 is field 1 with wire type 0 (varint); 96 01 is 150 in 7-bit groups, least significant first.
12 07 74 65 73 74 69 6e 67 1a 03 08 96 01
2: "testing"
3 {
1: 150
}08 fe ff ff ff ff ff ff ff ff 01
1: 18446744073709551614 (as int64 and int32: -2)
int32 and int64 write negative numbers as 10-byte varints; sint32 and sint64 use ZigZag instead, so −2 would be the single byte 03.
Common uses
- Reading gRPC and gRPC-Web requests and responses captured in the browser’s network panel, a proxy or a HAR file.
- Finding out what an app or device sends when there is no schema at hand.
- Checking that a service writes the fields and values you expect, with the .proto pasted.
- Debugging Protobuf messages in Kafka, Pub/Sub, Redis or files, pasted as Base64 or hex.
- Learning the wire format: varints, ZigZag, fixed-size values, length-delimited fields and packed repeated fields.
How the wire format works
A message is a list of fields, each a tag followed by a value. The tag is a varint field_number << 3 | wire_type; there are six wire types (encoding guide):
- VARINT (0): int32, int64, uint32, uint64, sint32, sint64, bool and enums, 7 bits per byte.
- I64 (1): fixed64, sfixed64 and double, 8 bytes little-endian.
- LEN (2): strings, bytes, nested messages and packed repeated fields, after a varint length.
- SGROUP (3) and EGROUP (4): the start and end of a proto2 group.
- I32 (5): fixed32, sfixed32 and float, 4 bytes little-endian.
The bytes alone never say whether a LEN field is text, bytes or a message, or whether a varint is signed: that is in the schema. Without one, the tool lists every reading that fits and puts the likeliest first.
gRPC and gRPC-Web bodies
gRPC puts each message in a frame: one flag byte (1 when the message is compressed with the method in the grpc-encoding header), a 4-byte big-endian length and the message (gRPC over HTTP/2). gRPC-Web adds a final frame with the flag 0x80 that carries the trailers, such as grpc-status, and in its text mode the body is Base64, possibly in several padded chunks (gRPC-Web protocol). The tool recognises all of these, decompresses gzip and deflate frames, and decodes each message.
Limitations
- Without a schema, a short LEN field can be valid as text, bytes and a message at once; the reading shown is a guess, and the others are listed.
- Imports are not fetched: paste every .proto file the message needs. The well-known types (google/protobuf/*.proto) are built in.
- Extensions and custom options are read but not used for labels. Messages compressed with snappy or another method gRPC allows are shown still compressed.
- Data up to 16 MB and 500,000 fields is decoded; the tree shows the first 5,000 fields, and copying or downloading includes all of them.
Privacy
On this device: nothing is sent
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
What do I get without a pass?
Without a pass, Protobuf Decoder shows every count with the first fields of the tree (up to 10) and the first lines of the text or JSON output (up to 20). Until you unlock it, the result can’t be downloaded or copied. A Pro, Premium or Ultimate pass, a one-time payment that never renews, unlocks the full result. The pricing page lists the passes and their prices.
Can I decode protobuf without the .proto file?
Yes. The wire format carries field numbers and wire types, so the structure always comes out; what is missing is names and exact types. Varints are shown as unsigned, signed and ZigZag, fixed values as integers and floats, and LEN fields as a nested message, a string or bytes — the same information protoc --decode_raw gives.
Why does a field show as a message when it should be a string (or the other way round)?
Some byte sequences are valid both ways. The tool prefers text when the bytes read as normal text, and a message otherwise. Paste the schema to settle it, or read the other interpretation listed under the field.
How do I get the bytes of a gRPC-Web call from my browser?
In the developer tools’ Network panel, select the request and look at the request payload or the response. For binary bodies, copy them as Base64 or hex (or save the HAR file and copy the body from it); for application/grpc-web-text the body is already Base64. Paste it here: the frames are found automatically.
Why is a negative number shown as a huge positive number?
Without a schema a varint is shown unsigned first. int32 and int64 store −1 as ff ff ff ff ff ff ff ff ff 01, which is 18446744073709551615 unsigned; the int64 reading below it says −1. If the field is sint32 or sint64, use the ZigZag reading.
Is my data sent anywhere?
No. Decoding runs in your browser, and the page works offline once loaded. The .proto you paste stays on your device too.