Protobuf to XML Converter

Input Protobuf

Output XML

Your XML appears here as you type.

Paste data to see token savings

Convert Protobuf to XML with our free online converter.

Example: Protobuf input and real XML output

The output below was generated by the same conversion code the converter uses, run on this sample when the page was built.

Protobuf input (159 characters)
user {
  id: 42
  email: "dev@example.com"
  active: true
  roles: "admin"
  roles: "billing"
  profile {
    display_name: "Dev Ops"
    locale: "en-SE"
  }
}
XML output (226 characters)
<user>
  <id>42</id>
  <email>dev@example.com</email>
  <active>true</active>
  <roles>admin</roles>
  <roles>billing</roles>
  <profile>
    <display_name>Dev Ops</display_name>
    <locale>en-SE</locale>
  </profile>
</user>

XML output is 42% larger 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).

Protobuf to XML: 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 XML: XML needs exactly one root element. Several top-level keys, or a top-level key holding an array, produce sibling roots that are not well-formed XML, which is why this sample is wrapped in a single key. Keys prefixed with @_ become attributes.

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
Full Protobuf Documentation →

About XML

Extensible Markup Language is a verbose but powerful format. Still widely used in legacy systems, SOAP APIs, and document formats.

  • ✓Rich metadata
  • ✓Namespaces
  • ✓Validation schemas
  • ✓Legacy support
Full XML Documentation →

Why Convert Protobuf to XML?

Use XML when working with legacy systems, SOAP APIs, or when you need rich metadata and validation schemas.

Protobuf to XML: Frequently Asked Questions

How do I convert Protobuf to XML?

Paste your Protobuf into the editor on json2toon.co. The tool detects the input and produces XML instantly, then you copy the result. Conversion runs entirely in your browser, so nothing is uploaded to a server.

Is the Protobuf to XML converter free?

Yes. Converting Protobuf to XML 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 XML?

Convert Protobuf to XML with our free online converter.

What should I watch out for when converting Protobuf to XML?

XML needs exactly one root element. Several top-level keys, or a top-level key holding an array, produce sibling roots that are not well-formed XML, which is why this sample is wrapped in a single key. Keys prefixed with @_ become attributes.

Is my data safe when I convert Protobuf to XML?

Yes. The Protobuf to XML 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.