Proto to JSON Converter

Protobuf Schema

JSON Output

{
"orderId": "orderId-1",
"customer": {
"name": "name-1",
"email": "[email protected]"
},
"items": [
{
"sku": "sku-1",
"quantity": 1,
"unitPriceCents": "1"
}
],
"status": "ORDER_STATUS_PENDING",
"createdAt": "2024-01-01T00:00:01Z"
}

What does this Proto to JSON converter do?

This tool generates sample JSON from a Protocol Buffers (.proto) definition. Use the output as a starting point for test payloads or API examples. The structure follows your selected message type; the values are generated samples that you can replace with your own data.

The JSON is type-correct for that message. It is not business-correct: dates, IDs, and enum names are placeholders, not records from your system. The tool does not decode binary Protobuf messages or generate JSON Schema. Parsing and generation run in your browser; the schema and JSON are not sent to a server.

Why the JSON looks different from your .proto

These differences come from the proto3 JSON mapping, not from a failed conversion. Treat quoted 64-bit integers as strings; do not strip the quotes to make them look like numbers.

What you seeWhy, and whether to change it
user_id became userIdField names are lowerCamelCase unless the field sets json_name. Change the JSON only if your consumer expects a different spelling.
A 64-bit integer in quotes, such as "1999"int64, uint64, sint64, fixed64, and sfixed64 are JSON strings so parsers keep the full width. Keep the quotes.
A long string on a bytes fieldThe value is Base64, not hex.
An enum as "ORDER_STATUS_PENDING"Enums are emitted as names. Replace the name if your test needs another value.
Only one field from a oneofThe mapping allows one branch. This sample picks one; edit the JSON if you need a different branch.
Timestamp or Duration as a string Timestamp is RFC 3339. Duration looks like 1s. They are not nested objects.

Separate from those mapping rules, this page fills each repeated field with one element and each map with one entry so you can see the shape. Add more items if your test needs them. That limit is this tool’s sample strategy, not a Protobuf requirement.

Missing fields or conversion errors

If the JSON is missing fields you expected, or the editor shows an error, use the row that matches what you see.

What you seeCauseWhat to do
The JSON is the wrong message shapeThe file defines more than one top-level messageChoose the type in the message selector
A missing import or unknown type A dependency is not in the current input. This page does not fetch other files or Schema Registry subjects. A missing import weak is ignored. Paste the missing type definitions into this editor, then delete the matching import lines. Type names and packages must match.
Nested objects are {} or arrays are [] Nested user messages stop expanding at depth 4, including messages that are not recursive Fill in the nested sample where you need it
Other oneof fields are absentEach sample sets one branchEdit the JSON or regenerate
Any contains a StringValueThe tool packs a StringValue example because it cannot infer your type Replace @type and the payload with the type you actually send

Use the sample in a Kafka producer

This JSON is an editing input. Producing a Protobuf message still requires the matching message type and a serializer. Sending the JSON as plain text does not turn it into a Protobuf payload.

In Kafma Schema Explorer open the Registry subject and version, pick the message type, then generate or adjust the payload in the Kafka Console and produce it. Field names and well-known types in the desktop app can differ from this page; confirm them against the version you produce.

Produce Protobuf messages in Kafma

Available for macOS, Windows, Linux