JSON to Protobuf Schema screenshot

JSON to Protobuf Schema

Generate a proto3 schema from a JSON sample in your browser. Nested objects become messages, arrays become repeated fields, and null is marked optional.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What this json to protobuf schema does

Nested objects become their own messages, arrays of objects are merged into one repeated message, integers map to int64, fractions to double, and a null value becomes an optional string with a comment. The schema is a starting point inferred from one sample, not a contract: field numbers must be reviewed before anything is stored.

How to use it

JSON to Protobuf Schema: paste the JSON into the box above, set Root message name (default "Root"), and press Run to get the proto3 schema below.

Worked example

Input:

{"id":1,"name":"Ada","tags":["a","b"],"address":{"city":"London"}}

Output:

syntax = "proto3";

message Address {
  string city = 1;
}

message Root {
  int64 id = 1;
  string name = 2;
  repeated string tags = 3;
  Address address = 4;
}

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads JSON and returns proto3 schema; reloading the page discards both.

Nested objects become their own messages, arrays of objects are merged into one repeated message, integers map to int64, fractions to double, and a null value becomes an optional string with a comment. The schema is a starting point inferred from one sample, not a contract: field numbers must be reviewed before anything is stored.

Generate a proto3 schema from a JSON sample in your browser. Nested objects become messages, arrays become repeated fields, and null is marked optional.

How to use it

JSON to Protobuf Schema: paste the JSON into the box above, set Root message name (default "Root"), and press Run to get the proto3 schema below.

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads JSON and returns proto3 schema; reloading the page discards both.

What to Expect

Best for

  • Converting JSON to proto3 schema when the data is already on screen.

What this tool keeps

  • Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.

Sample input

{"id":1,"name":"Ada","tags":["a","b"],"address":{"city":"London"}}

Sample output

syntax = "proto3"; message Address { string city = 1; } message Root { int64 id = 1; string name = 2; repeated string tags = 3; Address address = 4; }

Frequently asked questions

How do I use the json to protobuf schema?

JSON to Protobuf Schema: paste the JSON into the box above, set Root message name (default "Root"), and press Run to get the proto3 schema below.

Is my input uploaded?

No. The text is parsed on this page with JavaScript and is never posted to a server.

Is there a size limit?

Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.