Protobuf Text to JSON Converter
Guide
Protobuf Text to JSON Converter
Convert between Protobuf text format and JSON instantly. Parse Protobuf TextProto (the human-readable text representation of Protocol Buffer messages) into JSON, or convert JSON back into Protobuf text format. Supports nested messages, repeated fields, and configurable indentation.
How to Use
Select your conversion direction (Protobuf Text → JSON or JSON → Protobuf Text), paste your input, choose indentation size, and the result appears instantly. Use the built-in example to see a realistic Protobuf message converted to JSON.
Features
- Bidirectional conversion – TextProto to JSON and JSON to TextProto
- Nested message support – handles arbitrarily deep message nesting
- Repeated fields – correctly converts repeated Protobuf fields to JSON arrays
- Configurable indentation – choose 2 or 4 spaces for output formatting
- Example preset – realistic Protobuf message for reference
- Client-side only – your data never leaves the browser
FAQ
-
What is Protobuf text format (TextProto)?
TextProto is a human-readable text representation of Protocol Buffer messages, primarily used for configuration files, test fixtures, and debugging output. Unlike the binary wire format used for transport, TextProto uses field names and is readable without a schema: field_name: value for scalars, and field_name { ... } for nested messages. It is not a standard serialisation format for production use but is common in Google’s internal tooling and TensorFlow config files.
-
How does Protobuf binary format differ from JSON?
Protobuf binary format uses field numbers (not names) and varint encoding to produce compact, fast-to-parse messages. A JSON equivalent of a Protobuf message is typically 3–5x larger. However, Protobuf binary is not self-describing — you need the .proto schema to decode it. JSON is self-describing and human-readable. Protobuf is preferred for high-throughput internal APIs; JSON is preferred for public APIs and configuration.
-
When would I need to convert between TextProto and JSON?
Common scenarios include: migrating configuration files from proto-based systems (TensorFlow, Bazel) to JSON-based systems, debugging Protobuf messages by converting to readable JSON, writing test fixtures in JSON for systems that consume Protobuf, and inspecting ML model configurations stored in TextProto format. The conversion is lossy for types with no JSON equivalent (like Protobuf Any or raw bytes), so review the output carefully.
-
What are the limitations of Protobuf text to JSON conversion without a schema?
Without the .proto schema, a converter cannot know field types (int32 vs int64 vs string) or distinguish between optional, required, and repeated fields from structure alone. Repeated fields with a single value look identical to optional fields. Enums appear as integers without symbolic names. This tool performs a best-effort structural conversion; for production use, use the official protoc JSON mapping with the schema available.
Install Our Extensions
Add IO tools to your favorite browser for instant access and faster searching
恵 Scoreboard Has Arrived!
Scoreboard is a fun way to keep track of your games, all data is stored in your browser. More features are coming soon!
Must-Try Tools
View All New Arrivals
View AllUpdate: Our latest tool was added on Apr 4, 2026
