# Protobuf Decoder

- Human page: https://happytails.ai/en/developer-tools/protobuf-decoder/
- Markdown: https://happytails.ai/en/developer-tools/protobuf-decoder.md
- Structured JSON: https://happytails.ai/agents/en/developer-tools/protobuf-decoder/index.json
- Visibility: public

## Tool capabilities

| Property | Value |
| --- | --- |
| Tool ID | `protobuf-decoder` |
| Category | developer-tools |
| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |
| Browser execution | Use the visible action or interactive controls. |
| Browser processing | Browser; see tool notes for network behavior. |
| HTTP API | Not callable through HTTP. |
| Browser-agent interface | run_current_tool |

### Implementation notes

Runs in your browser in a background worker. Accepts up to 200000 characters of hex or base64 and a schema of up to 100000 characters.

### Inputs and settings

Text input: Encoded message.

Example or placeholder shown in the interface (not a validated fixture):

```text
0a 03 41 31 37 10 03
```

Hex digits (spaces allowed) or standard base64. Up to 200,000 characters. Review the settings before running.

| Setting | Meaning | Control type | Default | Constraints |
| --- | --- | --- | --- | --- |
| `encoding` | Message encoding | select | "auto" | Allowed: auto, hex, base64 |
| `schema` | .proto schema, optional | textarea | "" |  |
| `messageType` | Message type, optional | text | "" |  |

### Browser-agent workflow

1. Open the human page in a browser that supports WebMCP.
2. Discover the interface exposed by that page; use its actual schema.
3. Select files on the page first when the tool requires files.
4. Call `run_current_tool` with valid input and settings.
5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.

Calls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.

### Planning specification

Accepts up to 200,000 characters of hex or base64 (at most 500,000 bytes) and a schema of up to 100,000 characters. Decoding runs in your browser. The download is a JSON report.

This describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.

### Complete machine-readable capability record

```json
{
  "id": "protobuf-decoder",
  "category": "developer-tools",
  "built": true,
  "requirements": "Accepts up to 200,000 characters of hex or base64 (at most 500,000 bytes) and a schema of up to 100,000 characters. Decoding runs in your browser. The download is a JSON report.",
  "implementation": {
    "fields": [
      {
        "key": "encoding",
        "label": "Message encoding",
        "value": "auto",
        "type": "select",
        "values": [
          "auto",
          "hex",
          "base64"
        ]
      },
      {
        "key": "schema",
        "label": ".proto schema, optional",
        "value": "",
        "type": "textarea",
        "maxLength": 100000,
        "help": "proto2 or proto3 without imports. Leave empty to see the raw wire fields."
      },
      {
        "key": "messageType",
        "label": "Message type, optional",
        "value": "",
        "type": "text",
        "maxLength": 500,
        "help": "Needed when the schema defines more than one message, such as demo.Person."
      }
    ],
    "registrationFamily": "api-contracts-reference",
    "codeDirection": "ltr",
    "inputMaxLength": 200000,
    "inputErrorCode": "API_CONTRACTS_REFERENCE_TOO_LONG",
    "note": "Runs in your browser in a background worker. Accepts up to 200000 characters of hex or base64 and a schema of up to 100000 characters.",
    "experience": {
      "automatic": false,
      "single": false,
      "inputMaxLength": 200000,
      "inputMode": "text",
      "label": "Encoded message",
      "placeholder": "0a 03 41 31 37 10 03",
      "help": "Hex digits (spaces allowed) or standard base64. Up to 200,000 characters. Review the settings before running.",
      "helpParts": [
        "Hex digits (spaces allowed) or standard base64.",
        "Up to 200,000 characters.",
        "Review the settings before running."
      ],
      "action": null
    },
    "mode": "explicit",
    "interactive": false
  },
  "execution": "Browser interface",
  "api": null,
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}
```

## Page guide

Decode a protobuf message from hex or base64. Add a .proto schema to get named fields in the proto3 JSON format, or leave it out to inspect the raw wire fields.

### How to use Protobuf Decoder

1. Paste the message bytes as hex or base64.
2. Optionally paste the .proto schema and the message type.
3. Run the decoder.
4. Review the decoded fields and download the JSON report.

How can we improve this tool?

Report a problem or share an idea.

Please leave out private information. Your message and the tool name go to our team via PostHog.

## Useful next steps

- [Base64 encoder decoder](https://happytails.ai/en/developer-tools/base64-encoder-decoder/) ([Markdown](https://happytails.ai/en/developer-tools/base64-encoder-decoder.md))

- [Hex to text](https://happytails.ai/en/developer-tools/hex-to-text/) ([Markdown](https://happytails.ai/en/developer-tools/hex-to-text.md))

- [Hex file viewer](https://happytails.ai/en/developer-tools/hex-file-viewer/) ([Markdown](https://happytails.ai/en/developer-tools/hex-file-viewer.md))

Accepts up to 200,000 characters of hex or base64 (at most 500,000 bytes) and a schema of up to 100,000 characters. Decoding runs in your browser. The download is a JSON report.

## With a schema

Fields are named with their JSON names. 64-bit integers are strings, bytes are base64, enums use their value names, and repeated fields accept packed and unpacked encodings. A message field sent several times is merged, as protobuf parsers do. Fields the schema does not define are listed as unknown.

### Without a schema

Every field is shown with its number and wire type, with each possible reading: unsigned, signed and zigzag integers, fixed-size numbers, text when the bytes are valid UTF-8, and a nested message when the bytes parse as one.

### Limits

The schema parser covers proto2 and proto3 messages, enums, oneof, maps, nested types and reserved ranges in one file. Imports, groups, extensions and editions are not supported. Malformed bytes are rejected rather than partly decoded.
