JSON to Protobuf (proto3) Converter

BeanTrans generates valid proto3 Protocol Buffers message definitions from JSON directly in your browser, assigning sequential field numbers, repeated fields for arrays, and companion messages for nested objects.

Key Capabilities

  • Outputs ready-to-compile proto3 syntax with sequential field tag numbering.
  • Maps JSON arrays to repeated fields and nested JSON objects to named message types.
  • Bi-directional: paste an existing .proto message on the left to convert it to Go, Java, Rust, or TypeScript.

Type Mapping Reference

Source Target Notes
stringstringproto3 UTF-8 string
integerint32 / int64Configurable integer width
decimaldouble64-bit IEEE double
booleanboolproto3 bool
array<T>repeated Tproto3 repeated field

Frequently Asked Questions

Which Protocol Buffers syntax version does BeanTrans output?
BeanTrans generates proto3 message definitions with sequential field numbers starting from 1.
Can I convert Protobuf messages into Go structs or Java classes?
Yes. Set Source to Protobuf on the left panel (or click the Swap button) and choose Go, Java, Rust, TypeScript, Python, Kotlin, JSON, or SQL DDL.
Does BeanTrans send my .proto schemas or JSON to any backend?
No. All AST parsing and code generation run locally in browser memory.