Protocol Buffers (Protobuf) is a schema-driven format for serializing structured data.
Developed by Google for efficient data exchange, it provides a language-neutral way to define durable contracts and encode application data into compact binary payloads.
How it works
Protobuf works by combining a pre-defined schema with your data to produce a compact binary payload. Unlike JSON, which repeats field names in every object, Protobuf identifies fields by numeric IDs from the schema. That is the core tradeoff: less self-description in each payload, more value from a shared contract.
"Protobuf" refers to both an Interface Definition Language (IDL) and a high-performance Wire Format. While the machine-optimized binary encoding is the primary target, the ecosystem also defines standardized mappings for human-readable representations and diagnostic tools. Explore how a single User message can be represented across these different specifications:
The Schema (.proto)
The Compilation Pipeline
How your human-readable schema becomes high-performance code.