protoc --descriptor_set_out=out.desc writes a
FileDescriptorSet, a message of the schema
descriptor.proto
that describes one or more .proto files. Its files are usually named
.desc, .binpb or .pb. The explorer reads every
field below when the bytes fit the schema and every file’s name ends in
.proto; custom options in the options messages’ extension ranges are
allowed and shown as raw fields. Field numbers are those of the main branch of
Protocol Buffers in November 2026.
FileDescriptorSet
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | file | repeated FileDescriptorProto | The files. |
The message and SourceCodeInfo each reserve extension number 536,000,000.
FileDescriptorProto
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | name | string | The file’s name, relative to a source root. |
| 2 | package | string | The package. |
| 3 | dependency | repeated string | Imported files. |
| 10 | public_dependency | repeated int32 | Indexes of imports that are public. |
| 11 | weak_dependency | repeated int32 | Indexes of imports that are weak. |
| 15 | option_dependency | repeated string | Imports used only for options. |
| 4 | message_type | repeated DescriptorProto | Top-level messages. |
| 5 | enum_type | repeated EnumDescriptorProto | Top-level enums. |
| 6 | service | repeated ServiceDescriptorProto | Services. |
| 7 | extension | repeated FieldDescriptorProto | Top-level extensions. |
| 8 | options | FileOptions | File options. |
| 9 | source_code_info | SourceCodeInfo | Locations and comments, when kept. |
| 12 | syntax | string | proto2, proto3, or editions for edition files. Missing means proto2. |
| 14 | edition | Edition | The edition, for edition files. |
Edition values
| Value | Name |
|---|---|
| 0 | EDITION_UNKNOWN |
| 1 | EDITION_1_TEST_ONLY |
| 2 | EDITION_2_TEST_ONLY |
| 900 | EDITION_LEGACY |
| 998 | EDITION_PROTO2 |
| 999 | EDITION_PROTO3 |
| 1000 | EDITION_2023 |
| 1001 | EDITION_2024 |
| 1002 | EDITION_2026 |
| 9999 | EDITION_UNSTABLE |
| 99997 | EDITION_99997_TEST_ONLY |
| 99998 | EDITION_99998_TEST_ONLY |
| 99999 | EDITION_99999_TEST_ONLY |
| 2147483647 | EDITION_MAX |
DescriptorProto
A message type.
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | name | string | The name. |
| 2 | field | repeated FieldDescriptorProto | Fields. |
| 6 | extension | repeated FieldDescriptorProto | Extensions declared inside it. |
| 3 | nested_type | repeated DescriptorProto | Nested messages. |
| 4 | enum_type | repeated EnumDescriptorProto | Nested enums. |
| 5 | extension_range | repeated ExtensionRange | Numbers open to extensions. |
| 8 | oneof_decl | repeated OneofDescriptorProto | Oneofs. |
| 7 | options | MessageOptions | Options. |
| 9 | reserved_range | repeated ReservedRange | Reserved numbers. |
| 10 | reserved_name | repeated string | Reserved names. |
| 11 | visibility | SymbolVisibility | Local or exported. |
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | start | int32 | First number, inclusive. |
| 2 | end | int32 | Last number, exclusive. |
| 3 | options | ExtensionRangeOptions | Options. |
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | start | int32 | First number, inclusive. |
| 2 | end | int32 | Last number, exclusive. |
ExtensionRangeOptions
| Field | Name | Type | Meaning |
|---|---|---|---|
| 2 | declaration | repeated Declaration | Which extension uses which number. |
| 50 | features | FeatureSet | Edition features. |
| 3 | verification | VerificationState | DECLARATION 0 or UNVERIFIED 1. |
| 999 | uninterpreted_option | repeated UninterpretedOption | Options not yet interpreted. |
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | number | int32 | The extension’s number. |
| 2 | full_name | string | Its fully qualified name. |
| 3 | type | string | Its type. |
| 5 | reserved | bool | Whether the number is reserved. |
| 6 | repeated | bool | Whether it is repeated. |
FieldDescriptorProto
A field, or an extension when extendee is set.
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | name | string | The name. |
| 3 | number | int32 | The field number. |
| 4 | label | Label | LABEL_OPTIONAL 1, LABEL_REQUIRED 2, LABEL_REPEATED 3. |
| 5 | type | Type | The field’s type. |
| 6 | type_name | string | The name of a message or enum type. |
| 2 | extendee | string | For an extension: the message it extends. |
| 7 | default_value | string | An explicit [default = …], as text. |
| 9 | oneof_index | int32 | Index of the oneof it belongs to. |
| 10 | json_name | string | Its name in ProtoJSON. |
| 8 | options | FieldOptions | Options. |
| 17 | proto3_optional | bool | A proto3 optional field. |
| Value | Name | Value | Name |
|---|---|---|---|
| 1 | TYPE_DOUBLE | 10 | TYPE_GROUP |
| 2 | TYPE_FLOAT | 11 | TYPE_MESSAGE |
| 3 | TYPE_INT64 | 12 | TYPE_BYTES |
| 4 | TYPE_UINT64 | 13 | TYPE_UINT32 |
| 5 | TYPE_INT32 | 14 | TYPE_ENUM |
| 6 | TYPE_FIXED64 | 15 | TYPE_SFIXED32 |
| 7 | TYPE_FIXED32 | 16 | TYPE_SFIXED64 |
| 8 | TYPE_BOOL | 17 | TYPE_SINT32 |
| 9 | TYPE_STRING | 18 | TYPE_SINT64 |
OneofDescriptorProto
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | name | string | The name. |
| 2 | options | OneofOptions | Options. |
EnumDescriptorProto and EnumValueDescriptorProto
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | name | string | The name. |
| 2 | value | repeated EnumValueDescriptorProto | The values. |
| 3 | options | EnumOptions | Options. |
| 4 | reserved_range | repeated EnumReservedRange | Reserved numbers. |
| 5 | reserved_name | repeated string | Reserved names. |
| 6 | visibility | SymbolVisibility | Local or exported. |
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | start | int32 | First number. |
| 2 | end | int32 | Last number. |
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | name | string | The name. |
| 2 | number | int32 | The number. |
| 3 | options | EnumValueOptions | Options. |
ServiceDescriptorProto and MethodDescriptorProto
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | name | string | The name. |
| 2 | method | repeated MethodDescriptorProto | The methods. |
| 3 | options | ServiceOptions | Options. |
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | name | string | The name. |
| 2 | input_type | string | The request message. |
| 3 | output_type | string | The response message. |
| 4 | options | MethodOptions | Options. |
| 5 | client_streaming | bool | Whether the client streams. |
| 6 | server_streaming | bool | Whether the server streams. |
FileOptions
Extension ranges: 990 to 998 and 1000 to the maximum. Numbers 38 and 42 are reserved.
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | java_package | string | The Java package. |
| 8 | java_outer_classname | string | The Java outer class. |
| 10 | java_multiple_files | bool | One Java file per class. |
| 20 | java_generate_equals_and_hash | bool | Deprecated. |
| 27 | java_string_check_utf8 | bool | Check UTF-8 in Java. |
| 9 | optimize_for | OptimizeMode | SPEED 1, CODE_SIZE 2, LITE_RUNTIME 3. |
| 11 | go_package | string | The Go package. |
| 16 | cc_generic_services | bool | Generate C++ service stubs. |
| 17 | java_generic_services | bool | Generate Java service stubs. |
| 18 | py_generic_services | bool | Generate Python service stubs. |
| 23 | deprecated | bool | Deprecated. |
| 31 | cc_enable_arenas | bool | C++ arena allocation. |
| 36 | objc_class_prefix | string | Objective-C class prefix. |
| 37 | csharp_namespace | string | C# namespace. |
| 39 | swift_prefix | string | Swift prefix. |
| 40 | php_class_prefix | string | PHP class prefix. |
| 41 | php_namespace | string | PHP namespace. |
| 44 | php_metadata_namespace | string | PHP metadata namespace. |
| 45 | ruby_package | string | Ruby package. |
| 50 | features | FeatureSet | Edition features. |
| 999 | uninterpreted_option | repeated UninterpretedOption | Options not yet interpreted. |
MessageOptions
Extension ranges: 990 to 998 and 1000 to the maximum. Numbers 4, 5, 6, 8 and 9 are reserved.
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | message_set_wire_format | bool | Use the MessageSet wire format. |
| 2 | no_standard_descriptor_accessor | bool | No descriptor() accessor. |
| 3 | deprecated | bool | Deprecated. |
| 7 | map_entry | bool | The synthetic entry of a map field. |
| 11 | deprecated_legacy_json_field_conflicts | bool | Allows JSON name conflicts, for old files. |
| 12 | features | FeatureSet | Edition features. |
| 999 | uninterpreted_option | repeated UninterpretedOption | Options not yet interpreted. |
FieldOptions
Extension ranges: 990 to 998 and 1000 to the maximum. Numbers 4 and 18 are reserved.
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | ctype | CType | STRING 0, CORD 1, STRING_PIECE 2. |
| 2 | packed | bool | Packed encoding. |
| 6 | jstype | JSType | JS_NORMAL 0, JS_STRING 1, JS_NUMBER 2. |
| 5 | lazy | bool | Parse the message lazily. |
| 15 | unverified_lazy | bool | Lazily, without verification. |
| 3 | deprecated | bool | Deprecated. |
| 10 | weak | bool | Deprecated: a weak reference. |
| 16 | debug_redact | bool | Redact in debug output. |
| 17 | retention | OptionRetention | RETENTION_UNKNOWN 0, RETENTION_RUNTIME 1, RETENTION_SOURCE 2. |
| 19 | targets | repeated OptionTargetType | What an option applies to: TARGET_TYPE_UNKNOWN 0, …_FILE 1, …_EXTENSION_RANGE 2, …_MESSAGE 3, …_FIELD 4, …_ONEOF 5, …_ENUM 6, …_ENUM_ENTRY 7, …_SERVICE 8, …_METHOD 9. |
| 20 | edition_defaults | repeated EditionDefault | Defaults per edition. |
| 21 | features | FeatureSet | Edition features. |
| 22 | feature_support | FeatureSupport | The editions a feature is available in. |
| 999 | uninterpreted_option | repeated UninterpretedOption | Options not yet interpreted. |
| Field | Name | Type | Meaning |
|---|---|---|---|
| 3 | edition | Edition | The edition. |
| 2 | value | string | The default, as text. |
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | edition_introduced | Edition | First edition. |
| 2 | edition_deprecated | Edition | Deprecated from. |
| 3 | deprecation_warning | string | The warning. |
| 4 | edition_removed | Edition | Removed from. |
| 5 | removal_error | string | The error. |
OneofOptions, EnumOptions, EnumValueOptions, ServiceOptions, MethodOptions
All five end in extension ranges 990 to 998 and 1000 to the maximum, and have an
uninterpreted_option field 999.
| Message | Field | Name | Meaning |
|---|---|---|---|
| OneofOptions | 1 | features | FeatureSet. |
| EnumOptions | 2 | allow_alias | Allows two names for one number. |
| 3 | deprecated | Deprecated. | |
| 6 | deprecated_legacy_json_field_conflicts | Allows JSON name conflicts, for old files. | |
| 7 | features | FeatureSet. Number 5 is reserved. | |
| EnumValueOptions | 1 | deprecated | Deprecated. |
| 2 | features | FeatureSet. | |
| 3 | debug_redact | Redact in debug output. | |
| 4 | feature_support | FeatureSupport. | |
| ServiceOptions | 34 | features | FeatureSet. |
| 33 | deprecated | Deprecated. | |
| MethodOptions | 33 | deprecated | Deprecated. |
| 34 | idempotency_level | IDEMPOTENCY_UNKNOWN 0, NO_SIDE_EFFECTS 1, IDEMPOTENT 2. | |
| 35 | features | FeatureSet. |
UninterpretedOption
An option as written, before protoc has worked out what it is.
| Field | Name | Type | Meaning |
|---|---|---|---|
| 2 | name | repeated NamePart | The option’s name, in parts. |
| 3 | identifier_value | string | An identifier. |
| 4 | positive_int_value | uint64 | A positive integer. |
| 5 | negative_int_value | int64 | A negative integer. |
| 6 | double_value | double | A number. |
| 7 | string_value | bytes | A string. |
| 8 | aggregate_value | string | A message, as text. |
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | name_part | string (required) | The part. |
| 2 | is_extension | bool (required) | Whether it is an extension name in parentheses. |
FeatureSet
Edition features at one level. See Editions and features.
| Field | Name | Values |
|---|---|---|
| 1 | field_presence | EXPLICIT 1, IMPLICIT 2, LEGACY_REQUIRED 3. |
| 2 | enum_type | OPEN 1, CLOSED 2. |
| 3 | repeated_field_encoding | PACKED 1, EXPANDED 2. |
| 4 | utf8_validation | VERIFY 2, NONE 3 (1 reserved). |
| 5 | message_encoding | LENGTH_PREFIXED 1, DELIMITED 2. |
| 6 | json_format | ALLOW 1, LEGACY_BEST_EFFORT 2. |
| 7 | enforce_naming_style | STYLE2024 1, STYLE_LEGACY 2, STYLE2026 3. |
| 8 | default_symbol_visibility | EXPORT_ALL 1, EXPORT_TOP_LEVEL 2, LOCAL_ALL 3, STRICT 4. |
| 9 | enforce_proto_limits | LEGACY_NO_EXPLICIT_LIMITS 1, PROTO_LIMITS2026 2. |
Each enum’s value 0 is its unknown value, as in FIELD_PRESENCE_UNKNOWN.
Number 999 is reserved, and numbers 1000 to 9994, 9995 to 9999 and 10000 are open to
extensions. A message FeatureSetDefaults gives each edition’s defaults;
it is used by tools, not in descriptor sets.
SourceCodeInfo
Where each element is in the source, kept when protoc is given
--include_source_info.
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | location | repeated Location | The locations. |
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | path | repeated int32, packed | Field numbers and indexes leading to the element. |
| 2 | span | repeated int32, packed | Start line, start column, end line and end column. |
| 3 | leading_comments | string | The comment before it. |
| 4 | trailing_comments | string | The comment after it. |
| 6 | leading_detached_comments | repeated string | Earlier comments, not attached. |
GeneratedCodeInfo
Written beside generated code, not in descriptor sets. Maps generated code back to
.proto elements.
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | annotation | repeated Annotation | The annotations. |
| Field | Name | Type | Meaning |
|---|---|---|---|
| 1 | path | repeated int32, packed | Path to the element. |
| 2 | source_file | string | The source file. |
| 3 | begin | int32 | Where the code starts. |
| 4 | end | int32 | Where the code ends. |
| 5 | semantic | Semantic | NONE 0, SET 1, ALIAS 2. |