HomeJSON to Protobuf

JSON to Protobuf

Online JSON to Protobuf converter with Proto2/Proto3 syntax and field type mapping to generate ready-to-use .proto message definitions

Protobuf Settings

Protocol Version

Generation Options

Type Mapping

Configure JSON type to Protobuf field type conversion rules

JSON Input

Protobuf Definition

PROTO3 Definition
Waiting for generated Protobuf definition...

Conversion Stats

0
Messages
0
Fields
0
Enums
0
Nested Messages


Documentation

About JSON to Protobuf

This tool converts JSON structures into .proto definitions with version selection, naming controls, type mapping, and export utilities.

Key Features

  • Version Modes: proto2 and proto3 style settings.
  • Naming Controls: Package name and message prefix.
  • Type Mapping: Configurable string/integer/float/boolean mappings.
  • Generation Toggles: Optional fields and optimization-related options.
  • Stats Panel: Message/field/enum/nested counts.
  • Export: Copy and download .proto output.

Steps

  1. Choose protobuf version and package.
  2. Paste JSON sample.
  3. Configure mapping and generation options.
  4. Review .proto output and stats.
  5. Copy/download result.

Use Cases

  • gRPC schema prototyping.
  • Migrating JSON contracts to protobuf.
  • Sharing consistent message models across services/clients.

FAQ

Why are arrays/nested objects generated unexpectedly?

Deep structures trigger nested message inference; use more consistent sample shapes.

How to choose proto2 vs proto3?

proto3 is common for new projects; use proto2 when you need finer field semantics.