.PROTO

PROTO File

Protocol Buffers Definition File
Ask a question
QUICK ANSWER

A .proto file is a plain-text schema for Protocol Buffers (protobuf), Google's data serialization system. Open it in any text editor or VS Code with the vscode-proto3 extension. To use it, compile it with protoc - the Protocol Buffer Compiler - which generates source code for your target language.

Developer: Google Category: Developer Files Open standard MIME: text/plain
OPENS ON Windows macOS Linux
Related: .DO · .MD · .HEX · .XSD

On this page

19k+ extensions indexed
Last reviewed Jun 26, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the PROTO file format?

.proto files store data structure or service definitions that allow the serialization process to conform to the Protocol Buffers (Protobuf) format, developed by Google originally for internal use around 2001 and open-sourced in 2008. .proto files are plain-text files with a well-defined syntax, designed as a more compact and developer-friendly alternative to XML. They are used widely within Google and in gRPC-based RPC frameworks for defining structured data and service contracts, and serve as the basis for generating source code for both clients and servers.

Buffer schema and definitions are saved in .proto files. Data structures are defined as messages composed of typed fields, each with a name, a scalar or message type, and a field number used as the binary wire tag. Services (RPC method definitions) can also be declared in the same file. The syntax version is declared at the top of the file: syntax = "proto2" (2008), syntax = "proto3" (2016), or the newer edition = "2024" keyword introduced by the Editions system (2023+), which replaces the rigid proto2/proto3 split with fine-grained feature flags.

Using the protoc compiler with language-specific plugins, users can generate source code in:

  • C++, C#, Objective-C
  • Java, JavaScript, Kotlin, Dart
  • Go
  • Python
  • Ruby, PHP

For example, C++ code generated from file.proto is saved as file.pb.cc and the header file file.pb.h. Compilers and plugins are available for many different programming environments, making .proto a portable format for defining and distributing data contracts across services.

Data serialized using Protocol Buffers is typically saved to a compact binary file for portability and efficiency. Proto3 also defines a canonical JSON mapping, providing a human-readable encoding alongside the default binary format.

Security & safety

RISK: LOW

.proto files are plain text schema definitions with no executable code. Compiling them with protoc is safe. Generated code inherits the safety profile of the target language. Be cautious with .proto files from untrusted sources that import unknown external types - they may reference malicious code generators via protoc plugins.

Format details

in a nutshell
FULL NAMEProtocol Buffers Definition Fileaka Protobuf schema file, proto schema
DEVELOPERGooglesince 2008 (open-sourced; internally at Google since ~2001)
MIME TYPEtext/plain
TYPEtext (IDL - Interface Definition Language)
STANDARDOpen · royalty-free
This extension is also used by…
  • Amaya Web Editor file - db_name 'Amaya file' in source database is incorrect; Amaya (W3C editor, EOL 2012) used .amaya, not .proto.

Programs that open PROTO files

Windows3 apps
Notepad Open-source Open .proto file; syntax highlight via user-defined language or plugin.
Visual Studio Code Open-source Open .proto file directly; install 'vscode-proto3' extension for syntax highlighting and linting.
protoc (Protocol Buffer Compiler) Open-source protoc --<lang>_out=./output yourfile.proto - compiles schema to language-specific code.
macOS2 apps
Visual Studio Code Open-source Open .proto file directly; install 'vscode-proto3' extension.
protoc (Protocol Buffer Compiler) Open-source brew install protobuf; then protoc --<lang>_out=. yourfile.proto
Linux2 apps
protoc (Protocol Buffer Compiler) Open-source apt install protobuf-compiler / dnf install protobuf-compiler; then protoc --<lang>_out=. yourfile.proto
Visual Studio Code Open-source Open .proto file; install vscode-proto3 extension for syntax support.

Technical details

deep spec
Syntax formatPlain-text Interface Definition Language (IDL)
EncodingUTF-8 plain text
Declared syntax versionsproto2 (2008), proto3 (2016); Edition 2024 via new editions system (2023+)
Wire encoding (compiled output)Length-prefixed binary with base-128 varints; 6 wire types (varint, 64-bit, length-delimited, start/end group, 32-bit)
Field number range1-536,870,911; numbers 1-15 encode in 1 byte (reserve for frequently used fields)
Compilerprotoc (Protocol Buffer Compiler); language-specific plugins extend output targets
Supported output languagesC++, C#, Java, JavaScript, Go, Python, Ruby, PHP, Dart, Kotlin (via plugins)
Output file namingDerived from .proto filename: e.g. file.pb.cc / file.pb.h (C++), file_pb2.py (Python)
RPC supportservice/rpc blocks compile to gRPC stub code for client and server
JSON mappingProto3 defines canonical JSON encoding; field names map to camelCase keys by default
Reserved fields keywordreserved prevents accidental reuse of retired field numbers and names
Typical file size1 KB - 100 KB; large services use multi-file schemas with import statements
MIME typetext/plain (source file); application/x-protobuf (serialized binary payloads)
CompressionNone in source file; serialized binary output is compact by design without requiring additional compression
Released2008 (open-sourced; internally at Google since ~2001)
Latest versionEdition 2024 (released 2024); previously proto3 (2016), proto2 (2008)
Open standardYes · royalty-free
Specificationprotobuf.dev

PROTO conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with PROTO files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about PROTO files.

Frequently asked questions

How do I compile a .proto file?
Install the Protocol Buffer Compiler (protoc) from github.com/protocolbuffers/protobuf, then run: protoc --<lang>_out=./output yourfile.proto (replace <lang> with python, go, java, cpp, etc.).
What is the difference between proto2 and proto3?
Proto3 (2016) simplified the syntax: all fields are optional by default, required fields are removed, and JSON mapping is built in. Proto2 (2008) retains required/optional/repeated keywords and extensions.
Can I open a .proto file in a text editor?
Yes - it is plain text. VS Code with the 'vscode-proto3' extension provides syntax highlighting, auto-complete, and linting.
What is the difference between a .proto file and a .pb file?
.proto is the human-readable schema source. .pb (or no standard extension) is the binary serialized data produced at runtime using the schema - these are two completely different things.
What is 'buf' and how does it relate to .proto files?
buf (buf.build) is a modern toolchain for Protocol Buffers: it lints, formats, and compiles .proto files and provides a schema registry. It is a popular alternative to raw protoc.

References

1Protocol Buffers Documentation (protobuf.dev)protobuf.dev
2GitHub - protocolbuffers/protobufgithub.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.MAGNETMagnet Link File
3.BINCD/DVD Disc Image (BIN/CUE)
4.CRDOWNLOADChrome Partial Download File
5.PARTPartial Download File
6.M4AMPEG-4 Audio File
7.EXEWindows Executable (Portable Executable)
8.JPGJPEG Image
9.JSONJavaScript Object Notation file
10.ICSiCalendar data file

Related extensions

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z