Skip to content
gohacks.dev
APIs

Protobuf Decoder

Decode a Protocol Buffers message from hex or base64 without its .proto schema, showing each field number, wire type and the possible readings of its value.

Free · No sign-up · Your inputs stay in your browser

Input

Decode Protocol Buffers without a schema

Output

25 bytes, 7 fields

FieldTypeValue
1varint150 (zigzag 75)
2bytes"testing"
3message6 bytes (decoded below)
3.1message4 bytes (decoded below)
3.1.1varint1 (zigzag -1)
3.1.2varint2 (zigzag 1)
4i321065353216 / float 1

Without the .proto file only the wire format is known: each field's number and wire type. A varint could be an int, a bool or an enum (shown with its zigzag reading for sint fields); a length-delimited field could be a string, bytes or a nested message, so all plausible readings are shown. protoc --decode_raw gives the same view on the command line. For gRPC, strip the 5-byte frame header first.

Runs in this browser. Nothing you paste is sent to a server.

What the wire format tells you

Protocol Buffers encode field numbers and wire types, not names or exact types, so without the schema some ambiguity remains: a varint may be an int, a bool or an enum, and a length-delimited field may be a string, bytes or a nested message. The encoding guide explains each wire type. protoc --decode_raw gives the same view on the command line.

gRPC payloads

A gRPC message on the wire starts with a 5-byte header: one compression flag byte and a 4-byte length. Remove it before decoding the rest as a protobuf message.

Share

Frequently asked questions

How do I decode protobuf with the schema?
protoc --decode=package.Message file.proto < message.bin prints it with field names.
What are wire types 3 and 4?
Start and end group, a deprecated encoding from proto2. Modern messages use length-delimited nested messages instead.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools