Turn a JSON payload into a Protobuf schema, CBOR bytes and zero-copy struct layouts for C++, Rust and Go, and compare the sizes.
Paste JSON to get a Protobuf v3 schema, the CBOR (RFC 8949) bytes and C++, Rust or Go struct layouts with offsets. Free and runs in your browser.
Protobuf v3
CBOR RFC 8949
C++ · Rust · Go
Frequently asked questions
Is my JSON uploaded anywhere?
No. Parsing and encoding happen in your browser, so you can safely paste real payloads while you experiment.
Are the Protobuf bytes real?
Yes. The Protobuf tab encodes your sample with the proto3 wire format: tag and varint rules, length-delimited strings and nested messages, packed numeric arrays and little-endian doubles. Default values (0, false and empty strings) are omitted, as the format requires. The encoder is tested against the examples in the official encoding guide.
How accurate is the Protobuf schema?
The schema infers field types from the sample JSON, so treat it as a starting point. Whole numbers become int32 (or int64 when they do not fit in 32 bits) and fractions become double, so check ids, timestamps and money values and adjust types and field numbers before using the schema.
What does the CBOR output show?
The CBOR view encodes your JSON following RFC 8949 and shows the bytes in hexadecimal so you can see how much space each field takes compared with the JSON text.
What is the struct layout tab for?
It lays the fields out in memory for C++, Rust or Go with their alignment, so you can see the offset and size of each field and generate matching struct definitions.