HomeAll toolsJSON ↔ Protobuf

JSON ↔ Protobuf

Load multiple Proto files and convert between JSON, Base64 and Protobuf binary.

Data is processed only in your browser
1 file(s)
JSON
Protobuf · Base64

How to use

JSON ↔ Protobuf lets you seamlessly convert between JSON and Protocol Buffers binary format. Upload multiple .proto files with automatic import dependency resolution, and correct handling of both proto2 and proto3 syntax.

How to use: First, upload your .proto files (multiple files supported — the tool auto-resolves import dependencies). Then paste your JSON data, select the target format (Protobuf binary or Base64), and click convert.

Proto2 vs Proto3 Comparison

FeatureProto2Proto3
Field modifiersrequired / optional / repeatedDefault optional, repeated only
Default valuesCustom defaults supportedType zero values (0, "", false)
EnumsAliases allowedFirst value must be 0
Map typeNot supportedSupports map<key, value>
OneofNot supportedSupported
Unknown fieldsPreservedDiscarded by default

Use Cases

Inspect Protobuf message contents when debugging gRPC services, convert JSON data to Protobuf format for API communication, reverse-engineer Protobuf-encoded network packets, and quickly validate .proto file definitions during development and testing.

Troubleshooting

Import resolution fails? Make sure all referenced .proto files are uploaded. The tool matches imports by filename. If imports use path prefixes (e.g. import "proto/common.proto"), maintain consistent file structure.

Empty conversion result? Check that JSON field names match the .proto definitions. Protobuf uses snake_case naming — if your JSON uses camelCase, add json_name options in the .proto file to map them.

Frequently asked questions

Which .proto syntax versions are supported?

Both proto2 and proto3 are supported. The tool auto-detects the syntax declaration and correctly handles optional, required, repeated, and other field modifiers.

How are import dependencies handled?

When uploading multiple .proto files, the tool automatically resolves import statements and builds the dependency graph. Make sure all referenced .proto files are uploaded.

Are nested messages and enums supported?

Yes. All Protobuf features including nested messages, enums, oneof, map fields, and more are correctly encoded and decoded.

See all questions

Go deeper

Related tools