The well-known types are the messages that ship with Protocol Buffers in package
google.protobuf, in the .proto files under
src/google/protobuf (syntax = "proto3"). In the binary format
they are ordinary messages: their fields are encoded like any other, and nothing in
the bytes marks a message as a Timestamp or an Any. Only
ProtoJSON and the
generated code give them special forms. The tables give each field’s number, so that
their bytes can be read without the schema; the explorer, which has no schema for a
plain .pb file, shows them by number. The field lists are those of the
protobuf repository’s main branch in November 2026.
Any
any.proto: a message of any type, with the name of its type.
| Field | Name | Type | Wire type | Meaning |
|---|---|---|---|---|
| 1 | type_url | string | LEN | A URL whose last path segment is the message’s full name, usually type.googleapis.com/ followed by the name, such as type.googleapis.com/google.protobuf.Duration. |
| 2 | value | bytes | LEN | The message, serialised: a message of that type, nested as bytes. |
Timestamp
timestamp.proto: a point in time, counted from the Unix epoch
(1970-01-01T00:00:00Z) in UTC, ignoring leap seconds.
| Field | Name | Type | Wire type | Meaning |
|---|---|---|---|---|
| 1 | seconds | int64 | VARINT | Seconds since the epoch, from -62135596800 (0001-01-01T00:00:00Z) to 253402300799 (9999-12-31T23:59:59Z) inclusive. |
| 2 | nanos | int32 | VARINT | Nanoseconds, from 0 to 999,999,999. Never negative: a time before the epoch with a fraction has negative seconds and nanos that count forward. |
One and a half seconds after the epoch, seconds 1 and nanos 500,000,000:
| Bytes | Meaning |
|---|---|
08 01 | Field 1, VARINT: seconds = 1 |
10 80 CA B5 EE 01 | Field 2, VARINT: nanos = 500,000,000 |
Duration
duration.proto: a signed span of time.
| Field | Name | Type | Wire type | Meaning |
|---|---|---|---|---|
| 1 | seconds | int64 | VARINT | Seconds, from -315,576,000,000 to +315,576,000,000 inclusive (about ±10,000 years). |
| 2 | nanos | int32 | VARINT | Nanoseconds, from -999,999,999 to +999,999,999. For a span of a second or more, non-zero nanos have the same sign as seconds. |
A negative int32 or int64 takes ten bytes as a varint (see Varints), so a negative duration is longer than a positive one.
Struct, Value, ListValue and NullValue
struct.proto: a JSON-like value held in a message.
| Field | Name | Type | Wire type | Meaning |
|---|---|---|---|---|
| 1 | fields | map<string, Value> | LEN, one per entry | The members, as map entries: key field 1, value field 2. |
| Field | Name | Type | Wire type | Meaning |
|---|---|---|---|---|
| 1 | null_value | NullValue | VARINT | JSON null; the only value is 0. |
| 2 | number_value | double | I64 | A number. |
| 3 | string_value | string | LEN | A string. |
| 4 | bool_value | bool | VARINT | true or false. |
| 5 | struct_value | Struct | LEN | An object. |
| 6 | list_value | ListValue | LEN | An array. |
| Field | Name | Type | Wire type | Meaning |
|---|---|---|---|---|
| 1 | values | repeated Value | LEN, one per value | The elements. |
NullValue is an enum with one value, NULL_VALUE = 0. Because a
oneof member is written even at its default, a null is the two bytes
08 00.
FieldMask
field_mask.proto: a set of field paths, for partial reads and updates.
| Field | Name | Type | Wire type | Meaning |
|---|---|---|---|---|
| 1 | paths | repeated string | LEN, one per path | Paths of field names joined by dots, such as user.display_name, in the schema’s names (snake_case). |
Wrappers
wrappers.proto: a scalar in a message of its own, to tell an unset value
from a zero. Each has one field, value, number 1; an absent field is the
default, so a wrapper holding zero is an empty message.
| Message | Field 1 type | Wire type |
|---|---|---|
| DoubleValue | double | I64 |
| FloatValue | float | I32 |
| Int64Value | int64 | VARINT |
| UInt64Value | uint64 | VARINT |
| Int32Value | int32 | VARINT |
| UInt32Value | uint32 | VARINT |
| BoolValue | bool | VARINT |
| StringValue | string | LEN |
| BytesValue | bytes | LEN |
Empty
empty.proto: a message with no fields, used as a request or response
that carries nothing. Its encoding is zero bytes.
Type, Field, Enum, EnumValue and Option
type.proto: a description of a message or enum type, used by APIs that
describe types at run time (and in Api). It is a simpler relative of the
descriptor messages.
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | name | string | The fully qualified message name. |
| 2 | fields | repeated Field | The fields. |
| 3 | oneofs | repeated string | The names of the oneofs. |
| 4 | options | repeated Option | The options. |
| 5 | source_context | SourceContext | The file it was defined in. |
| 6 | syntax | Syntax | The syntax of that file. |
| 7 | edition | string | The edition, when syntax is SYNTAX_EDITIONS. |
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | kind | Field.Kind | The field’s type, below. |
| 2 | cardinality | Field.Cardinality | 0 unknown, 1 optional, 2 required, 3 repeated. |
| 3 | number | int32 | The field number. |
| 4 | name | string | The field name. |
| 6 | type_url | string | For a message or enum field, the type’s URL, as in Any. |
| 7 | oneof_index | int32 | 1 plus the index of its oneof in Type.oneofs; 0 when it is in none. |
| 8 | packed | bool | Whether a repeated field is packed. |
| 9 | options | repeated Option | The options. |
| 10 | json_name | string | The JSON name. |
| 11 | default_value | string | The default, as text (proto2). |
Field 5 is not used. Field.Kind: 0 TYPE_UNKNOWN, 1 TYPE_DOUBLE,
2 TYPE_FLOAT, 3 TYPE_INT64, 4 TYPE_UINT64, 5 TYPE_INT32, 6 TYPE_FIXED64,
7 TYPE_FIXED32, 8 TYPE_BOOL, 9 TYPE_STRING, 10 TYPE_GROUP, 11 TYPE_MESSAGE,
12 TYPE_BYTES, 13 TYPE_UINT32, 14 TYPE_ENUM, 15 TYPE_SFIXED32, 16 TYPE_SFIXED64,
17 TYPE_SINT32, 18 TYPE_SINT64 (the same numbers as FieldDescriptorProto.Type, with 0
added).
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | name | string | The fully qualified enum name. |
| 2 | enumvalue | repeated EnumValue | The values. |
| 3 | options | repeated Option | The options. |
| 4 | source_context | SourceContext | The file it was defined in. |
| 5 | syntax | Syntax | The syntax of that file. |
| 6 | edition | string | The edition, when syntax is SYNTAX_EDITIONS. |
| Message | Field | Name | Type |
|---|---|---|---|
| EnumValue | 1 | name | string |
| EnumValue | 2 | number | int32 |
| EnumValue | 3 | options | repeated Option |
| Option | 1 | name | string: the option’s name, such as map_entry or a custom option’s full name |
| Option | 2 | value | Any: the value, a wrapper for a scalar or the message itself |
Syntax: 0 SYNTAX_PROTO2, 1 SYNTAX_PROTO3, 2 SYNTAX_EDITIONS.
Api, Method and Mixin
api.proto: a description of a service, its methods and the services it
includes.
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | name | string | The fully qualified service name. |
| 2 | methods | repeated Method | The methods. |
| 3 | options | repeated Option | The options. |
| 4 | version | string | The API’s version, such as v1. |
| 5 | source_context | SourceContext | The file it was defined in. |
| 6 | mixins | repeated Mixin | Services whose methods it includes. |
| 7 | syntax | Syntax | The syntax of that file. |
| 8 | edition | string | The edition, when syntax is SYNTAX_EDITIONS. |
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | name | string | The method’s simple name. |
| 2 | request_type_url | string | The request message’s type URL. |
| 3 | request_streaming | bool | Whether requests are streamed. |
| 4 | response_type_url | string | The response message’s type URL. |
| 5 | response_streaming | bool | Whether responses are streamed. |
| 6 | options | repeated Option | The options. |
| 7 | syntax | Syntax | The syntax. |
| 8 | edition | string | The edition. |
| Message | Field | Name | Type | Meaning |
|---|---|---|---|---|
| Mixin | 1 | name | string | The included service’s full name. |
| Mixin | 2 | root | string | A path prefix for the included methods’ HTTP paths. |
| SourceContext | 1 | file_name | string | The path of the .proto file, such as google/protobuf/source_context.proto (source_context.proto). |