JSON to Protobuf schema
Turn a JSON sample into a Protocol Buffers .proto message definition.
JSON to Protobuf schema
Paste a JSON sample and this tool infers the shape of your data and writes it out as a Protocol Buffers message definition, ready to drop into a .proto file. It is built for the everyday case of turning an API response, a config object or a log record into a starting schema, instead of typing field numbers and types by hand.
Choose proto3 or proto2 syntax, name the root message, and add a package declaration if your project uses one. Field numbers start at 1 by default and increase by 1 per field, both configurable for a numbering scheme reserved in advance. Arrays become repeated fields, and an object whose values are all one type — a lookup keyed by ID or language code — becomes a map<string, T> instead of a fixed message, so a dictionary field doesn't turn into dozens of named fields. Turn on the optional keyword to mark fields missing or null in part of your sample, and toggle nested messages to keep child types inside their parent rather than as flat top-level siblings. ISO 8601-looking date strings map to google.protobuf.Timestamp, and each field can carry a comment with its original JSON key.
Deeply nested objects, arrays of objects, arrays of arrays and mixed-type fields are all handled: a genuinely mixed-type value falls back to google.protobuf.Value with the matching import added automatically. Malformed JSON is reported with the line and column where parsing failed rather than a generic error.
Everything runs locally in your browser — your JSON is never uploaded anywhere. Copy the generated schema, download it as a .txt file to rename into a .proto, or send the output to another tool to keep working.