Protobuf to TOON Converter
Input Protobuf
or drop a file anywhere
Output TOON
Your TOON appears here as you type.
users[3]{id,name,role}:
1,Alice,admin
2,Bob,user
3,Cleo,userPaste data to see token savings
Convert Protobuf to TOON with our free online converter.
Example: Protobuf input and real TOON output
The output below was generated by the same conversion code the converter uses, run on this sample when the page was built.
user {
id: 42
email: "dev@example.com"
active: true
roles: "admin"
roles: "billing"
profile {
display_name: "Dev Ops"
locale: "en-SE"
}
}user:
id: 42
email: dev@example.com
active: true
roles[2]: admin,billing
profile:
display_name: Dev Ops
locale: en-SETOON output is 15% smaller than the Protobuf input. The same data is 140 characters as minified JSON and 218 as pretty-printed JSON. Sizes are character counts, not tokens: token counts depend on the model's tokenizer (see the tokenizer comparison). Across larger datasets, TOON averages about 43% fewer tokens than JSON (42.6%) according to the official TOON benchmark.
Protobuf to TOON: what changes
- Reading Protobuf: Input is Protobuf text format (the readable form used in .textproto files and debug output), not the binary wire format. Repeated fields are collected into arrays; no .proto schema is read, so types are inferred from the values.
- Writing TOON: TOON saves the most on arrays of objects that share the same fields: they collapse into one header plus one row per record. Nested or non-uniform objects are written as indented key: value lines and save much less.
About Protobuf
Protocol Buffers is a binary serialization format from Google. Extremely compact and fast, but requires a schema definition.
- ✓Very compact
- ✓Fast serialization
- ✓Schema evolution
- ✓Type-safe
About TOON
TOON (Token-Oriented Object Notation) is an indentation-based format designed for LLM prompts. It uses about 43% fewer tokens than JSON on average (42.6% in the official TOON v4.1 benchmark), ranging from about 33% on mixed/nested structures to about 59% on flat uniform tables.
- ✓About 43% fewer tokens than JSON on average
- ✓Tabular rows for uniform arrays
- ✓Lossless round trip to JSON
- ✓Readable without tooling
Why Convert Protobuf to TOON?
Use TOON when building LLM-powered applications, optimizing API costs, or when you need compact, readable data for AI models.
Protobuf to TOON: Frequently Asked Questions
How do I convert Protobuf to TOON?
Paste your Protobuf into the editor on json2toon.co. The tool detects the input and produces TOON instantly, then you copy the result. Conversion runs entirely in your browser, so nothing is uploaded to a server.
Is the Protobuf to TOON converter free?
Yes. Converting Protobuf to TOON on json2toon.co is free with no account, signup, or usage limit. A free public API is also available for automated, programmatic conversion.
Why convert Protobuf to TOON?
Convert Protobuf to TOON with our free online converter.
What should I watch out for when converting Protobuf to TOON?
TOON saves the most on arrays of objects that share the same fields: they collapse into one header plus one row per record. Nested or non-uniform objects are written as indented key: value lines and save much less.
Is my data safe when I convert Protobuf to TOON?
Yes. The Protobuf to TOON conversion happens client-side in your browser. Your source data stays on your device and is never sent to or stored on a server, which makes it safe for private or sensitive payloads.