JSON to Protobuf Schema Converter
Convert JSON objects to Protocol Buffers (proto3) schema definitions. Handles nested objects, arrays, and all scalar types automatically.
Related JSON Tools
What Is a JSON to Protobuf Converter?
Protocol Buffers (protobuf) is Google's language-neutral binary serialization format. A JSON to Protobuf converter reads a JSON object and generates a .proto schema file with proto3 syntax — including nested message types for every nested object in your JSON.
How to Use
- Paste your JSON object into the left textarea.
- Set a root message name (default: Root) and package name.
- The proto3 schema is generated automatically as you type.
- Click Copy to copy the schema and save it as a
.protofile.
Features
- Generates proto3 syntax with correct scalar types: string, bool, int64, double.
- Handles nested objects as separate named message types.
- Arrays are converted to
repeatedfields automatically. - Configurable root message name and package declaration.
- Runs entirely in your browser — no data is sent to any server.
FAQ
What proto syntax version does this use?
This tool always generates proto3 syntax, which is the current recommended version. Proto3 removes required/optional field labels and uses default zero values for unset fields.
How are JSON numbers mapped to proto types?
Integers (e.g. 42) map to int64, and floating-point numbers (e.g. 3.14) map to double. You can manually change these to int32, float, etc. after generation.
What happens with arrays of objects?
Arrays of objects generate a dedicated message type named after the parent message and field (e.g. RootRolesItem), and the field becomes a repeated field referencing that message.