โ† Templates
๐Ÿ“ฆ

Protobuf payload

Read a protobuf blob you have no .proto for

Open in bodeDeveloper ยท 7 blocks
Textโ†’Protobufโ†’JSON Viewerโ†’Template

A protobuf turns up in a log line, a cookie or a response body, and the .proto that describes it is often in somebody else's repository. This reads it either way: with the schema you get names and declared types, without it you get field numbers, and both are useful.

Delete the wire into .proto to see the difference. Without a schema a length-delimited field is a guess โ€” message, then text, then bytes โ€” and a packed list of numbers is indistinguishable from a string. With one, an enum reads as its name and a map comes back as an object.

The bytes stay in your browser. Nothing is uploaded, and the decoder is a few hundred lines of this app rather than a service.

The note it comes with

Read a protobuf

Paste a base64 (or hex) payload into the first box. The second box is the .proto, and it is optional: delete the wire into .proto and the same payload comes back as field numbers โ€” which is what you get when the schema is in somebody else's repository.

With the schema, the fields take their names and their declared types: an enum reads as its name, a packed repeated field becomes a list, a map becomes an object.

The tree explores it; the panel on the right is the version to paste into a ticket.