JSON to Protobuf Schema
JSON → proto3 .proto. Whole numbers beyond 32 bits become int64, arrays become repeated fields, and names are converted to the lower_snake_case the style guide requires.
JSON to Protobuf Schema — Free Online Tool
Generates a proto3 .proto file from a JSON sample, mapping values to int32, int64, double, bool and string, nesting message definitions for objects, marking arrays as repeated, assigning sequential field numbers, and converting keys to the lower_snake_case that the protobuf style guide requires, useful for bootstrapping gRPC service contracts from an existing REST payload.
How to use the JSON to Protobuf Schema
- Open the tool above — it runs entirely in your browser, so your input never leaves this page.
- Paste or type your input into the field, then press the relevant button (e.g. Encode / Decode, Generate, or Convert).
- Copy the result from the output area with the copy button orCtrl/Cmd + C.
- No signup, no upload, and no tracking — repeat as often as you need.
Frequently asked questions
Can I change the field numbers afterwards?
Only before anything has been serialized. Field numbers, not names, identify fields on the wire, so renumbering an already-deployed message silently misreads old data. Names can be changed freely; numbers cannot.
Why are the field names snake_case when my JSON is camelCase?
The protobuf style guide specifies lower_snake_case, and every code generator converts back to the target language's convention — protoc-gen-go produces UserName, protobuf-javascript produces userName. The JSON mapping also accepts both forms.
How does it choose int32 versus int64?
By magnitude. Whole numbers within the signed 32-bit range become int32; anything larger becomes int64. Epoch-millisecond timestamps always need int64 — a common source of truncation bugs when the schema is written by hand.
Free & private — why use this JSON to Protobuf Schema
The JSON to Protobuf Schema runs 100% client-side in your browser. Your data is never uploaded to a server, no account is required, and the tool is completely free. It works offline once the page has loaded and is part of a growing collection of privacy-first developer utilities.