01What is Protobuf Wire Decoder?
Protobuf Wire Decoder reads raw Protocol Buffers bytes and shows what is inside, even when you do not have the .proto file. Paste the bytes as hex or as base64. Spaces, colons and 0x prefixes in hex are ignored, and base64url is accepted too. The decoder follows the encoding guide on protobuf.dev. Every record starts with a tag, a varint holding the field number shifted left by three bits, with the wire type in the low three bits. There are six wire types. VARINT (0) holds integers, bools and enums. I64 (1) is 8 little-endian bytes. LEN (2) is a length-prefixed run of bytes. SGROUP (3) and EGROUP (4) mark a group, which the guide calls deprecated. I32 (5) is 4 little-endian bytes. A varint uses one to ten bytes. Each byte carries 7 bits of payload, lowest group first, and the top bit says whether more follow. The bytes do not say which type a field was declared as, so the tool shows each reading. A varint appears as uint64, as int64 when the two's complement value differs, and as a zigzag sint64. I64 values appear as fixed64, sfixed64 and double. I32 values appear as fixed32, sfixed32 and float. LEN fields are the hard part. A string, a bytes field, a nested message and a packed repeated field all look alike on the wire. The tool tries each one: valid UTF-8 becomes a string, the bytes are parsed as a nested message, and they are read as packed varints. Every reading that parses cleanly is listed. A worked example: 08 96 01 starts with tag 0x08, which is field 1 with wire type 0. The varint 96 01 gives 22 from the first byte plus 1 times 128 from the second, so 150. Read as zigzag, the same value is 75. The bytes 1a 03 08 96 01 are field 3, a LEN of 3 bytes, and those bytes parse as a nested message holding field 1 = 150. Paste 22 06 03 8e 02 9e a7 05 and you get field 4 as raw bytes, plus the packed reading [3, 270, 86942]. Bad input gets a clear error with a byte offset. That covers a truncated varint, a varint longer than ten bytes, field number 0, wire types 6 and 7, a LEN that runs past the end and a group with no matching end. There are limits. Without the schema it cannot know field names, enum names or which reading is the true one, so a short string can also look like a valid message. It does not split packed fixed32 or fixed64 arrays; read their raw bytes instead.
Backend and mobile developers who debug gRPC or protobuf traffic without the schema, and engineers who reverse-engineer saved protobuf data. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Protobuf Wire Decoder
- Paste the message bytes as hex or base64 into the input box
- Leave the format on Auto-detect, or pick Hex or Base64 if detection guesses wrong
- Read the decoded fields: each shows the field number, wire type, byte offset and size
- For LEN fields, compare the string, nested message and packed varint readings to find the one that fits
- Copy the text dump to paste into a bug report or chat
03Worked examples
- Input:
08 96 01 12 07 74 65 73 74 69 6e 67 - Result:
1: VARINT @0 = 150 (sint64 (zigzag): 75) 2: LEN @3 len=7 string "testing" - Field 1 is the varint 150 and field 2 is a 7-byte UTF-8 string.
- Input:
1a 03 08 96 01 - Result:
3: LEN @0 len=3 message { 1: VARINT @2 = 150 (sint64 (zigzag): 75) } - The 3 bytes inside field 3 parse as a nested message.
- Input:
DQAAgD8Q////////////AQ== - Result:
1: I32 @0 = 00 00 80 3f (fixed32: 1065353216, sfixed32: 1065353216, float: 1.0) 2: VARINT @5 = 18446744073709551615 (int64: -1, sint64 (zigzag): -9223372036854775808) - Base64 input. Field 2 is -1 as an int64, which takes 10 bytes on the wire.
- Input:
22 06 03 8e 02 9e a7 05 - Result:
4: LEN @0 len=6 bytes 03 8e 02 9e a7 05 or packed varints [3, 270, 86942] - A packed repeated field. The bytes are not valid UTF-8 or a valid message, so only the packed reading is offered.
- Input:
1b 08 01 1c - Result:
3: SGROUP @0 { 1: VARINT @1 = 1 (sint64 (zigzag): -1, bool: true) } - A deprecated group: tag 0x1b opens field 3 and tag 0x1c closes it.
- Input:
12 07 74 65 73 74 - Result:
Error: LEN field 2 at byte 0 claims 7 bytes but only 4 remain. - The message was cut short, so the decoder stops with an error instead of guessing.
04Common use cases
- Reading a gRPC or protobuf payload captured from a network log when the .proto file is not at hand
- Checking which field numbers a client really sends before renumbering or removing fields in a schema
- Debugging a field that decodes to a strange number by comparing its signed, unsigned and zigzag readings
- Finding where a corrupted or cut-off message goes wrong, using the byte offset in the error and on each field
- Inspecting a protobuf blob stored base64-encoded in a database column, a cookie or a Kafka message
- Spotting a packed repeated field that a hand-written encoder writes as separate entries, or the other way round
- Learning how varints, tags and length prefixes are laid out in the protobuf wire format
05Tips
- gRPC frames start with a 5-byte prefix (a compressed flag and a 4-byte length); remove it before pasting
- A negative int32 or int64 is always 10 bytes on the wire, so a long run of ff bytes often means a negative number
- If a field's zigzag value looks sensible and the uint64 value is huge or odd, the field is probably sint32 or sint64
- A float of 1.0 shows as 00 00 80 3f in an I32 field, which helps you spot float fields quickly
- If auto-detect picks the wrong format, for example base64 that happens to be all hex digits, switch the format menu by hand
06Related concepts
Protocol Buffers, varint, zigzag encoding, wire type, packed repeated fields, gRPC.
Frequently Asked Questions
What is Protobuf Wire Decoder?
Protobuf Wire Decoder is a free, browser-based developer tool on AIDToolStack. Decode raw protobuf bytes in your browser without a .proto file. See field numbers, wire types, varints, zigzag, fixed values and nested messages. It requires no installation or sign-up and works entirely in your browser.
Is Protobuf Wire Decoder free to use?
Yes. No sign-up, no fees and no usage cap.
Does Protobuf Wire Decoder store my data?
No. It runs in your browser; nothing is uploaded.