Programming Guides

Learn how to use Protocol Buffers in your projects.

Language Guide (proto 2)

This topic covers how to use the version 2 of Protocol Buffers in your project.

Language Guide (proto 3)

This topic covers how to use the version 3 of Protocol Buffers in your project.

Style Guide

This topic provides direction for how best to structure your proto definitions.

Enum Behavior

This topic explains how enums currently work in Protocol Buffers vs. how they should work.


This topic explains how Protocol Buffers encodes data to files or to the wire.


This topic describes some commonly-used design patterns for dealing with Protocol Buffers.

Third-Party Add-ons

This topic links out to many open source projects that seek to add useful functionality on top of Protocol Buffers.

Extension Declarations

This topic describes in detail what extension declarations are, why we need them, and how we use them.

Application Note: Field Presence

This topic explains the various presence-tracking disciplines for protobuf fields. It also explains the behavior of explicit presence-tracking for singular proto3 fields with basic types.

Proto Best Practices

This topic contains vetted best practices for authoring Protocol Buffers.

API Best Practices

A future-proof API is surprisingly hard to get right. The suggestions in this document make trade-offs to favor long-term, bug-free evolution.