Protocol Buffers Decoder
Inspect an encoded Protocol Buffers message without uploading it or pretending to know its schema. This browser-based decoder accepts explicit hexadecimal, Base64, Base64URL, raw UTF-8 or binary-file input. It walks every valid protobuf wire type, keeps 64-bit integers exact, reports malformed offsets and shows all complete interpretations of ambiguous length-delimited bytes. The payload remains in your browser, and the decoder never contacts services named inside the data.
How it works
-
1
Choose the exact encoding
Select hex, Base64, Base64URL, raw UTF-8 or a binary file. The tool never auto-guesses the input format.
-
2
Inspect wire fields
Decode tags, field numbers and wire values, then expand every valid nested or packed candidate without assigning a schema type.
-
3
Export the report
Download a schema-less JSON, formula-safe CSV or human-readable text report for further analysis.
What a schema-less Protobuf decoder can prove
Protocol Buffers stores a sequence of field tags and values, not the original .proto declarations. The official protobuf encoding guide defines each tag by shifting the field number three bits and combining it with the wire type, equivalent to field_number × 8 + wire_type. That lets this decoder prove the field number, wire type, byte boundaries and the encodings that are structurally possible. It cannot prove whether a varint was declared as uint64, int64, sint64, bool or an enum, because those declarations can share the same bytes.
The input mode is always explicit. Hex accepts ASCII whitespace and at most one leading 0x. Base64 and Base64URL are validated separately, including length, padding and unused pad bits; standard and URL-safe alphabets cannot be mixed. Raw text means the exact UTF-8 bytes produced by the browser’s TextEncoder, backslash escapes are not interpreted. File input uses the file’s exact bytes.
Wire types and interpretations
| Wire type | Encoded value | What the report shows |
|---|---|---|
| 0 | Varint | Exact unsigned, two’s-complement signed and ZigZag values; Boolean only for 0 or 1 |
| 1 | Eight little-endian bytes | Exact fixed64 and sfixed64 integers plus a double candidate |
| 2 | Length followed by bytes | Hex and Base64, strict UTF-8 when valid, and every complete nested or packed candidate |
| 3 / 4 | Start and end group tags | Matched same-field group children; an end tag is a delimiter, not a separate record |
| 5 | Four little-endian bytes | Exact fixed32 and sfixed32 integers plus a float candidate |
JavaScript’s ordinary number type cannot exactly represent every 64-bit integer. This decoder uses BigInt throughout the wire parser and converts exact integers to decimal strings for display and export. Special floating-point values such as NaN, infinities and negative zero are also exported as strings so JSON does not silently turn them into another value.
Understanding length-delimited ambiguity
Wire type 2 is used for strings, raw bytes, embedded messages and packed repeated scalar values. Without a schema, a byte sequence may be valid in several of those roles simultaneously. For example, 2a 03 01 02 03 is field 5 containing three bytes. Those bytes are valid packed varints [1, 2, 3], but they are also ordinary bytes. The decoder displays both candidates and does not rank one as more likely.
A nested-message candidate appears only when the entire length-delimited body parses as a complete message. Packed varint, fixed32 and fixed64 candidates likewise appear only when all bytes are consumed under that interpretation. A strict UTF-8 candidate requires the complete sequence to decode without replacement characters. These checks show structural possibilities, not the field’s declared type.
Groups are handled according to the wire grammar even though modern schemas usually prefer embedded messages. A start-group tag must close with an end-group tag carrying the same field number. A root-level, mismatched or missing end tag stops decoding at the exact byte offset. Fields decoded before the failure remain visible; missing bytes and unknown values never become a fake zero.
Limits, framing and safe handling
The decoder accepts one unframed message up to 10 MiB. It does not split a length-prefixed stream, gRPC frame, delimited-message file or transport envelope. Remove that framing first, then decode one message. The parser also caps total records, recursive depth, visible rows and candidate work. These controls follow the spirit of the official guidance on large data sets and implementation limits: protobuf is efficient, but a diagnostic browser tab still needs bounded memory and work.
Field numbers must be between 1 and 536,870,911. The decoder warns about 19,000–19,999 because the official field-number guidance reserves that implementation range. Wire types 6 and 7 are invalid.
Parsing and exporting happen locally. The multi-step view may keep a bounded payload in this tab’s sessionStorage for up to two hours; starting over removes it. Nothing is placed in the URL or sent to our servers. JSON output is explicitly a decode report in this tool’s own format, not ProtoJSON. CSV starts with a UTF-8 BOM and prefixes formula-like cells for safer spreadsheet opening. Reports can still contain confidential application data, so inspect them before sharing.
Frequently Asked Questions
No. The wire format preserves field numbers and wire encodings, but different declared scalar types can share the same bytes. Names, comments and most schema intent are not present.
No. Input validation, parsing, filtering and exports run in your browser. The payload is not sent to our servers or placed in the URL.
A length-delimited value can legally represent bytes, UTF-8 text, an embedded message or packed values. Without a schema, showing every complete candidate is more truthful than guessing.
A tag, varint, fixed-width value, declared length or group boundary was incomplete or invalid there. Earlier complete fields remain in the partial report.
Not directly. This decoder reads one protobuf message and does not remove gRPC, varint-length or other transport framing. Extract one message payload first.
Related Tools
Color Wheel Explorer
Explore the colour wheel interactively. Rotate harmonies, compare HSL vs RYB, spot complementary and triadic pairs in real time.
Color Palette Generator
Generate monochromatic, analogous, complementary, triadic or tetradic color palettes from a base HEX color and export copy-ready CSS variables.
ASCII Table Reference
Full ASCII table from 0 to 127 with decimal, hex, octal, binary, standard names and HTML numeric-reference notation, including NUL, LF and DEL.
FPS Counter
Measure browser FPS with requestAnimationFrame, smoothing, min/max frame rate, warnings and an optional graph. Runs locally with no upload or API.
Keyboard Shortcut Reference
Search documented default keyboard shortcuts for VS Code, Chrome and Bash with GNU Readline on macOS, Windows and Linux.
Noise Texture Generator
Generate a tileable SVG noise texture with adjustable opacity, grain frequency, noise type and background colour, then copy the ready-made CSS.
Tool available in other languages
- Protocol Buffers 디코더 [KO]
- Công cụ giải mã Protocol Buffers [VI]
- Protocol Buffers-avkodare [SV]
- Dekoder Protocol Buffers [PL]
- Protocol-Buffers-Decoder [DE]
- Protocol Buffers-decoder [NL]
- ตัวถอดรหัส Protocol Buffers [TH]
- Decodificador de Protocol Buffers [ES]
- Dekoder Protocol Buffers [ID]
- أداة فك ترميز Protocol Buffers [AR]
- Décodeur Protocol Buffers [FR]
- Decodificador de Protocol Buffers [PT]
- Protocol Buffers デコーダー [JA]
- Decodificatore Protocol Buffers [IT]
- Декодер Protocol Buffers [RU]
- Protocol Buffers Kod Çözücü [TR]
- Protocol Buffers 解码器 [ZH]