JSON to Protobuf Schema Converter (proto3)
Paste any JSON object or array and get a ready-to-use Protocol Buffers (proto3) schema, with fields mapped to proto scalar types (string, int64, double, bool), repeated fields for arrays, and separate messages for nested objects. Keys that aren't lower_snake_case get a [json_name = "..."] option so the canonical JSON mapping still matches your original key. Everything runs locally in your browser — your JSON is never uploaded.
How to use
- Paste or type your JSON into the input box.
- Optionally rename the root message (defaults to Message).
- Copy the generated .proto schema from the output box.
Frequently asked questions
- How are numbers typed?
- Whole numbers become int64 and numbers with a decimal point become double. Change them to int32, uint32, float and so on if you need a different width.
- What happens with null, empty arrays or nested arrays?
- These map to google.protobuf.Value (and import "google/protobuf/struct.proto" is added), because proto3 has no native null and doesn't allow repeated repeated fields.
- Why do some fields have a json_name option?
- Proto field names are lower_snake_case. When the canonical camelCase JSON mapping wouldn't reproduce your original key, a [json_name = "..."] option is added so JSON round-trips correctly.
- Is my JSON sent anywhere?
- No. Conversion happens entirely in your browser; nothing is uploaded.
Related tools
Protobuf Decoder (no .proto needed)
Paste base64 or hex protobuf bytes and read the fields — numbers, wire types, nested messages, strings and packed arrays — without a schema.
JSON to GraphQL Schema (SDL) Converter
Turn a JSON object into GraphQL type definitions (SDL) with scalar mapping, in your browser.
JSON → TypeScript Interface
Generate TypeScript interfaces from any JSON sample — types are inferred recursively and named after each key.
JSON to Zod Schema Generator
Turn a JSON object into a Zod validation schema with inferred types, in your browser.
JSON to Mongoose Schema Generator
Turn a JSON object into a Mongoose schema with type-mapped paths, in your browser.
JSON Schema Generator
Paste any JSON and get a draft-07 JSON Schema that matches its shape — types inferred, formats detected, required fields filled in.