Report

Help us improve this tool

JSON to Proto Converter

Turn sample JSON into Protocol Buffers v3 message definitions for services and codegen.

O M T

JSON to Protocol Buffers

Paste representative JSON. The tool infers scalar types (string, bool, int32, double), repeated fields for arrays, and nested message blocks for objects. Output is proto3 syntax suitable as a starting schema.

Limits

Inference follows the first non-null array element. null values are mapped to string as a safe default. Refine field types and oneof groups manually before production use.

If you need JSON Schema instead of Protobuf, check out the JSON to JSON Schema Generator or the YAML to JSON Schema Generator.

Frequently Asked Questions

Is the generated proto guaranteed to compile?

It should be valid proto3 in common cases. Edge cases (empty objects, duplicate logical shapes) may need manual cleanup.

Can I rename the root message?

Yes. Use the root message name field so the outer message matches your service naming conventions.

How do I handle enums?

Strings in JSON stay string fields. Replace them with enum definitions and field types in your hand-edited proto.