TXT · Text & Data tools

Protobuf Decoder

Input encoding
Indent
Or load a file
Encoded bytes
Decoded
Protobufformat0 Binput0lines out0chars out
Open the full binary format decoder with every format and the encoder

Shareable link

Settings are written to the URL as you change them. Nothing differs from the defaults yet.

What the wire format keeps

A protobuf field is a varint key followed by a value. The key holds the field number and a 3-bit wire type, so 08 means field 1, wire type 0. 089601 is the canonical example: field 1, varint, value 150.

Everything else is schema. Whether field 1 is an int32, an int64, a bool, or an enum is a decision made at compile time, and all of them look identical on the wire.

Signed integers

A varint holding 1 may be the number 1 or the number -1, depending on whether the field is declared int32 or sint32. Zigzag encoding maps signed values onto unsigned ones, and there is nothing in the bytes to say it was used.

The value shown here is the raw varint. Apply the zigzag transform yourself when the schema says sint32 or sint64.

Repeated and packed fields

A repeated field appears as the same key more than once, and the decoder collects those into an array. A packed repeated field is different: it arrives as one length-delimited value holding concatenated varints, which shows up as bytes rather than a list.

Groups, wire types 3 and 4, were removed from the language and are reported as an error rather than parsed.

Frequently Asked Questions

No. Names, types, and enum labels live in the .proto schema and are never sent on the wire. Only field numbers and wire types are in the bytes.

Field number 3 carrying a length-delimited value. The wire types are varint, fixed64, bytes, and fixed32.

Length-delimited fields are ambiguous. The decoder tries a nested message first, then UTF-8 text, then raw bytes, and short strings occasionally parse as a plausible message.

Pages locked to one format

Full Binary Format Decoder tool

Explore Our Tools

Browse all tools