Convert Protocol Buffers to JSON schema and vice versa. Part of the DevTools Surf developer suite. Browse more tools in the Data / SQL collection.
Use Cases
Convert a Protobuf schema to JSON Schema for use in REST API documentation.
Inspect binary Protobuf payloads by converting them to human-readable JSON for debugging.
Generate TypeScript types from a .proto definition via JSON Schema as an intermediate format.
Validate that a JSON payload conforms to a Protobuf message definition before encoding.
Tips
Define your .proto file with explicit field numbers before converting — field numbers are required in binary encoding and cannot be changed after data is written.
Use the 'camelCase field names' option when converting to JSON for consistency with JavaScript conventions; proto files conventionally use snake_case.
Validate round-trip fidelity: convert proto to JSON and back, then compare byte-level output to catch precision loss in float64 fields.
Fun Facts
Protocol Buffers were developed internally at Google starting around 2001 and open-sourced in 2008. They replaced XML for most inter-service communication at Google, reducing serialized data size by 3–10x.
proto3 (2016) removed required fields entirely to improve forward-compatibility — all fields are optional by default, which broke existing tooling that relied on required field validation.
gRPC, Google's open-source RPC framework released in 2015, uses Protocol Buffers as its default serialization format and is used by Netflix, Square, and Cisco in production.
FAQ
When should I use Protobuf instead of JSON?
Use Protobuf when serialized payload size and parse performance matter — gRPC services, high-throughput event streams, and mobile apps with bandwidth constraints. JSON is preferred for human-readable APIs and browser clients.
Does the converter handle repeated fields and nested messages?
Yes — repeated fields map to JSON arrays, and nested messages map to nested JSON objects. Oneof fields are represented as a single JSON property matching whichever field is set.