Skip to main content

Protobuf Text ↔ JSON Converter

Convert Protocol Buffers text format (prototext) to JSON and back. Schema-less structural conversion: nested messages become objects and repeated fields become arrays. Pick a direction and indentation.

Input

Output

Result
Was this helpful?

Guides

Convert Protocol Buffers text format (also called prototext or textproto) to JSON and back, right in your browser. Paste a message, pick a direction, and get a clean, indented result — no .proto schema, no compiler, no upload.

This is a schema-less, structural converter. It maps the shape of the data, not its wire encoding: it does not decode or produce binary protobuf. If you have the human-readable text form (name: "Alice", nested { } blocks, repeated keys), this tool is for you.

How to use it

  1. Paste your Protobuf text format or JSON into the Input box.
  2. Choose a Direction:
    • Protobuf Text → JSON turns prototext into a JSON object.
    • JSON → Protobuf Text turns a JSON object back into prototext.
  3. Pick 2 or 4 space indentation for the output.
  4. The Result updates automatically. Copy or download it.

What gets converted

  • Scalars — quoted strings, integers, floats, and true/false booleans.
  • Nested messages — a field { ... } block (or the older field < ... > form) becomes a nested JSON object.
  • Repeated fields — a key that appears more than once collapses into a JSON array, and JSON arrays expand back into repeated keys.
  • Enum values — bare UPPER_CASE identifiers stay unquoted when writing prototext and become plain strings in JSON.
  • Comments# line comments in prototext are ignored while parsing.

Example

Prototext input:

name: "John Doe"
id: 1234
address {
  city: "Springfield"
}
tags: "developer"
tags: "golang"

Becomes JSON:

{
  "name": "John Doe",
  "id": 1234,
  "address": { "city": "Springfield" },
  "tags": ["developer", "golang"]
}

Why isn't this the same as binary protobuf?

Binary protobuf encoding requires a .proto schema so it knows each field's number and type. Text format is self-describing enough to read structurally, which is why this converter can work without a schema. Use it for debugging log dumps, fixtures, and config in text format — not for parsing .pb binary payloads.

Does my data leave the browser?

No. The conversion runs entirely client-side in your browser. Nothing you paste is sent to a server.

protobufprototextjsonconvertertextproto

Use it from code

From 3 credits per call

REST API

curl -X POST https://api.iotools.cloud/v1/tool/protobuf-text-json-converter \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "inputText": "# Person message example\nname: \"John Doe\"\nid: 12…",
    "convertMode": "proto-to-json",
    "indentation": "2"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `protobuf-text-json-converter` tool (Protobuf Text ↔ JSON Converter) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.