A declarative schema language that generates type-safe data models and RPC code for TypeScript, Python, Java, Go, C++ and more from one .skir file.
protocolbuffers/protobuf
Google's language-neutral, platform-neutral format and toolchain for serializing structured data, with a protoc compiler and runtimes for many languages.
- Stars
- 72,151
- Forks
- 16,358
- Open issues
- 371
- Last commit
- 17 hours ago
What is it?
Protocol Buffers (protobuf) is a mechanism for serializing structured data that is independent of programming language and platform. Developers describe their data in .proto files, and the protoc compiler generates code for reading and writing those messages in the target language.
The repository contains the protocol compiler, written in C++, along with the C++ runtime and the core .proto files shipped with the project. Runtime libraries for Java, Python, Objective-C, C#, Ruby, PHP and other languages live in subdirectories or in linked sibling repositories such as protobuf-go and protobuf-javascript. Releases provide prebuilt protoc binaries for non-C++ users, and Bazel, Bzlmod and WORKSPACE setups are documented.
The project is widely used as the interchange format for RPC systems and as a compact alternative to text formats for storing structured records.
Key features
- 01Defines message schemas in language-neutral .proto files.
- 02protoc generates serialization code for multiple target languages.
- 03Provides runtimes for C++, Java, Python, Go, C#, Ruby and more.
- 04Prebuilt protoc binaries are published on GitHub releases.
- 05Supports Bazel, Bzlmod and legacy WORKSPACE builds.
Use cases
- Defining data contracts shared between services written in different languages.
- Serializing RPC request and response messages for gRPC-style APIs.
- Storing compact structured records where a text format would be too large or slow to parse.
Quick start
- 1
Download a pre-built protoc binary from the GitHub releases page
- 2
Follow the getting-started tutorials in the developer guide
Things to know
- The license is listed as NOASSERTION in the metadata, so the license terms are unclear.
- The head of the main branch can be broken by incompatible changes, so pin to a release for stable builds.
- C++ users and anyone needing to modify the code must build protoc from source, which takes more effort.
In collections
Topics
FAQ
- What is protobuf?
- Google's language-neutral, platform-neutral format and toolchain for serializing structured data, with a protoc compiler and runtimes for many languages. Protocol Buffers (protobuf) is a mechanism for serializing structured data that is independent of programming language and platform. Developers describe their data in .proto files, and the protoc compiler generates code for reading and writing those messages in the target language.
- Is protobuf free to use? What license does it have?
- protobuf is open source under the Other license. Check the license terms before using it in commercial products.
- Is protobuf still maintained?
- Actively maintained. The last commit to protobuf was on Nov 6, 2026.
- What can I use protobuf for?
- Defining data contracts shared between services written in different languages. Serializing RPC request and response messages for gRPC-style APIs. Storing compact structured records where a text format would be too large or slow to parse.
- How do I install protobuf?
- Download a pre-built protoc binary from the GitHub releases page Follow the getting-started tutorials in the developer guide
- Where can I get protobuf?
- The source code and installation instructions are on GitHub: https://github.com/protocolbuffers/protobuf
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A language-independent RPC framework with a code generator that builds interoperable clients and servers across many programming languages.
A compact, human-readable encoding of JSON data designed to reduce token usage when passing structured data to LLM prompts.
TypeScript transformer that compiles pure TypeScript types into runtime validators, JSON serializers, protobuf codecs and random generators.
C++ RPC framework built on Sogou's Workflow engine, supporting SRPC, bRPC, Thrift and tRPC protocols on Linux, macOS and Windows.
A cross-platform serialization library that lets you read binary data directly without parsing or unpacking it first.