Productivity and Utilities

Protobuf Wire Format Decoder

Paste protobuf bytes as hex or Base64 to list every field with its wire type and possible readings.

Your numbers

Hex bytes with or without spaces, or Base64. Up to 200,000 characters. Nothing is uploaded.

Result

Fields found

5

22 bytes read

Top-level fields
4
Nested messages
1
Bytes
22

Fields in order

FieldReadingValueAlso
1varint (wire 0, varint)150signed 150, zigzag 75, starts at byte 0
2string (wire 2, length-delimited)testing7 bytes, starts at byte 3
3message (wire 2, length-delimited)1 field3 bytes, starts at byte 12
3.1varint (wire 0, varint)150signed 150, zigzag 75, starts at byte 14
4fixed32 (wire 5, 32-bit)1065353216signed 1065353216, float 1, starts at byte 17
How this was calculated
  1. Each field starts with a tag, a varint whose low three bits are the wire type and whose remaining bits are the field number.
  2. Wire type 0 is a varint, 1 is eight fixed bytes, 5 is four fixed bytes and 2 is a length followed by that many bytes. The schema is not in the data, so a value is shown in every way it could be read: unsigned, signed, zigzag and bool for varints; unsigned, signed and double for 64-bit values; unsigned, signed and float for 32-bit values.
  3. A length-delimited field is tried as a nested message first. If it is not one, it is shown as text when it is valid UTF-8 with no control characters, and as bytes otherwise. A short text can also be a valid message, so the Also column mentions both when they fit.
  • Without the .proto file the field names and types are unknown, so a reading is a guess that fits the bytes. Groups (wire types 3 and 4) are not supported. Packed lists of numbers show as bytes or as a message when they happen to parse.

Calculated using SumPanda.com · https://sumpanda.com/protobuf-wire-format-decoder/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the protobuf wire format decoder

  1. Paste the bytes of a protobuf message as hex, with or without spaces, or as Base64.
  2. Choose Hex or Base64 to match what you pasted.
  3. Read the table of fields in order, with the path of nested fields written like 3.1.
  4. Use the Also column to see other readings of the same value, such as signed and zigzag numbers or a double.

Formula

tag = varint; field number = tag >> 3; wire type = tag & 7

wire type 0: varint, 1: 8 bytes, 2: length then that many bytes, 5: 4 bytes

zigzag value = (n >> 1) xor -(n & 1), signed value = n as a 64-bit two's complement number

a varint stores 7 bits per byte, low bits first, and a set top bit means another byte follows

The data contains only numbers and wire types. Without the .proto file, whether a varint is a count, a flag or a zigzag value is unknown, so each reading is offered.

The example from the encoding guide, plus more

The bytes 08 96 01 are a tag 08 (field 1, wire type 0) and the varint 96 01, which is 0x16 + 1 x 128 = 150. The bytes 12 07 followed by testing are field 2, wire type 2, length 7, so the value is the text testing. The bytes 1a 03 08 96 01 are field 3 with length 3, and the 3 bytes inside are themselves field 1 with the value 150.

The default sample combines those three with 25 00 00 80 3f, which is field 4 as a 32-bit value 0x3f800000 that reads as the float 1.0. The tool finds 5 fields in 22 bytes: 4 at the top level and 1 nested message. For 09 18 2d 44 54 fb 21 09 40 the 8 bytes read as the double 3.141592653589793.

Messages, text or bytes

A length-delimited field can hold text, raw bytes, a nested message or a packed list of numbers, and the wire format does not say which. The tool tries a nested message first, as the protoc command does when it decodes raw data. If the content is readable text without control characters, it is also shown as text, and when it is neither it is shown as hex.

To study a single number, the Varint and Zigzag Encoder shows how it is written in bytes. The Hex Viewer lets you look at a whole file, and the Number Base Converter converts a value between hex, decimal and binary.

Errors and what they mean

If the bytes end in the middle of a field, if a length runs past the end, or if a tag has field number 0, the tool names the byte where the problem starts. Groups, the older wire types 3 and 4, and the wire types 6 and 7 are not supported. A message that decodes without any error is not proof that the data is protobuf, since random bytes sometimes parse.

Assumptions and limits

  • The bytes are one complete message, with no framing such as a length prefix or a compression header in front.
  • Numbers are little endian, as the wire format requires.
  • Nested messages are followed up to five levels deep.
  • Up to 200,000 characters of input are read, and nothing is uploaded.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

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

A short string can happen to be a valid message too. The tool prefers the message when the bytes are not clearly ordinary text, and the Also column shows the other reading when there is one.

Where do the field names come from?

They do not exist in the data. Only numbers are sent, so a decoder without the schema can show field numbers and guess at types, and the schema file supplies the names.

What does zigzag mean?

It is a way to store negative numbers compactly in a varint, by mapping 0, -1, 1, -2 and so on to 0, 1, 2, 3. Fields declared as signed integers of the sint kind use it.

Can I paste a gRPC message?

A gRPC frame begins with a flag byte and a four byte length. Remove those first five bytes and paste what follows, or the first tag will be read from the wrong place.