[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"extension:v3:en:proto":3},{"resolvedFromAlias":4,"canonicalExt":5,"ext":5,"name":6,"category":7,"categoryName":8,"updatedAt":9,"popularity":10,"summary":11,"howToOs":12,"quickAnswer":18,"answerIntro":19,"whatIs":20,"description":21,"furtherReading":22,"openInstructions":41,"commonIssues":52,"securityNotes":71,"faq":75,"aliases":85,"mimeTypes":86,"relatedExtensions":88,"breadcrumbs":136,"categoryAnchor":146,"categoryFuturePath":147,"metaDescription":148,"availableHowToOs":149,"openOnDeviceLinks":150,"cannotOpenReasons":166,"cannotOpenFixes":167,"convertOptions":168,"securityAffiliateMessaging":169,"securityAffiliates":170},false,"proto","Protocol Buffers schema (Protocol Buffers definition file)","code","Code","2026-06-12T09:08:59.784Z",60,".proto files define data structures and services for Google’s Protocol Buffers. They are plain-text schemas that you open in a text editor/IDE or compile with the Protocol Buffers compiler (protoc) to generate code.",[13,14,15,16,17],"windows","mac","linux","ios","android","To open .PROTO files on Windows, open the .proto file with a text/code editor (it is plain text).","To open a .proto file, use a code editor (it’s a plain-text schema file) such as an editor included with your development tools, or view it with any text viewer. To use it in a project, compile it with protoc to generate source code for your target language.","A .proto file contains Protocol Buffers definitions written in the protobuf interface definition language (IDL), describing messages (structured data) and optionally services. The file is compiled by protoc to generate language-specific code used to serialize/deserialize data using Protocol Buffers. The language has defined syntax and semantics (for example, proto3 is specified in the official documentation).","Protocol Buffers (often called “protobuf”) is a language-neutral, platform-neutral mechanism for serializing structured data. In protobuf workflows, the .proto file is the human-edited contract: it defines message types and field numbers that are used for efficient binary serialization and compatibility over time.\n\nIn practice, .proto files are commonly checked into source control and used to generate code for multiple languages so different services and clients can share the same data definitions. The Protocol Buffers compiler (protoc) is the standard tool used to compile .proto schemas into code.\n\nIt’s important to distinguish .proto schema files from serialized protobuf data. The schema is plain text and typically reviewed like source code; the serialized payload is usually binary and is commonly labeled with the media type application/protobuf.",[23,26,29,32,35,38],{"title":24,"url":25},"Overview | Protocol Buffers Documentation","https://protobuf.dev/overview/",{"title":27,"url":28},"Language Guide (proto 3) | Protocol Buffers Documentation","https://protobuf.dev/programming-guides/proto3/",{"title":30,"url":31},"Protocol Buffers Language Specification (Proto3) | Protocol Buffers Documentation","https://protobuf.dev/reference/protobuf/proto3-spec/",{"title":33,"url":34},"GitHub - protocolbuffers/protobuf (protoc compiler and core project)","https://github.com/protocolbuffers/protobuf",{"title":36,"url":37},"IANA Media Types Registry (application/protobuf)","https://www.iana.org/assignments/media-types/media-types.xhtml",{"title":39,"url":40},"Protocol Buffer MIME Types | Protocol Buffers Documentation","https://protobuf.dev/reference/protobuf/mime-types/",{"windows":42,"macos":45,"linux":47,"ios":49,"android":51},[43,44],"Open the .proto file with a text/code editor (it is plain text).","If you need generated code, install protoc from the Protocol Buffers project and run: protoc --proto_path=. --\u003Clang>_out=. yourfile.proto",[43,46],"To generate code, install protoc and run: protoc --proto_path=. --\u003Clang>_out=. yourfile.proto",[43,48],"To generate code, install protoc (Protocol Buffers compiler) and run: protoc --proto_path=. --\u003Clang>_out=. yourfile.proto",[50],".proto files are plain text; you can view them in a text viewer app, but compiling with protoc is typically done on a desktop development machine.",[50],[53,59,65],{"title":54,"description":55,"steps":56},"The file opens as unreadable/binary text","A real .proto file is plain text. If it looks like random characters, you may have a serialized protobuf payload (binary) rather than a schema definition, or you may be opening the wrong file.",[57,58],"Confirm the file contains readable definitions like 'syntax = \"proto3\";' and 'message ...' (proto3 syntax is documented in the official spec).","If it is binary data, treat it as Protocol Buffers content (often application/protobuf) and locate the matching .proto schema used to encode it.",{"title":60,"description":61,"steps":62},"protoc fails with syntax errors","Compilation errors usually come from invalid proto syntax or using proto2 vs proto3 rules incorrectly (for example, missing/incorrect 'syntax' line).",[63,64],"Check whether the file declares the intended syntax (e.g., proto3) and follow the proto3 language guide/spec for valid definitions.","Re-run protoc after fixing the reported line/column; if there are multiple .proto files, ensure imports and paths are correct.",{"title":66,"description":67,"steps":68},"Imports not found when compiling","If your .proto uses 'import' statements, protoc needs to know where to search for those files via include/proto paths.",[69,70],"Run protoc with an explicit --proto_path (and additional include paths as needed) so imports resolve.","Verify the imported .proto files exist and match the import paths used in the file.",[72,73,74],".proto files are schema/source-like text and do not inherently execute code, but they can drive code generation; review untrusted .proto files before generating code into your project.","Be cautious when parsing or compiling untrusted protobuf schemas or protobuf data: protoc and protobuf parsers are complex and have had security-relevant bugs historically in many ecosystems; keep your protobuf toolchain updated.","Do not assume a .proto file is the same as serialized protobuf data; binary protobuf payloads are commonly identified as application/protobuf and require an appropriate schema to interpret safely and correctly.",[76,79,82],{"question":77,"answer":78},"Is a .proto file the actual data?","No. A .proto file defines the schema (messages/services). The actual serialized data is typically a binary protobuf message; protobuf content is commonly labeled as application/protobuf.",{"question":80,"answer":81},"How do I convert a .proto file to code?","Use the Protocol Buffers compiler (protoc) to compile the .proto schema and generate language bindings. The official documentation describes the workflow and the proto3 language guide.",{"question":83,"answer":84},"What does 'syntax = \"proto3\";' mean?","It declares that the file uses the proto3 version of the protobuf language. The proto3 specification defines the valid syntax and semantics for .proto files.",[],[87],"application/protobuf",[89,95,100,106,112,118,124,130],{"ext":90,"name":91,"category":7,"categoryName":8,"popularity":92,"summary":93,"howToOs":94},"php","PHP script (PHP source code)",85,".php files typically contain PHP source code used on web servers to generate dynamic web pages and API responses. You can open them in a code editor, but they are usually executed by a web server (often via PHP-FPM) rather than “run” like a normal desktop app.",[13,14,15,16,17],{"ext":96,"name":97,"category":7,"categoryName":8,"popularity":92,"summary":98,"howToOs":99},"sql","SQL script (Structured Query Language)",".sql files contain SQL statements (queries, schema definitions, and data changes) that can be run by a database tool or opened as plain text for review and editing.",[13,14,15,16,17],{"ext":101,"name":102,"category":7,"categoryName":8,"popularity":103,"summary":104,"howToOs":105},"cs","C# source code file",80,".cs files contain C# source code used to build .NET applications and libraries. They are plain-text files typically edited in code editors and IDEs such as Visual Studio Code with C# tooling.",[13,14,15,16,17],{"ext":107,"name":108,"category":7,"categoryName":8,"popularity":109,"summary":110,"howToOs":111},"go","Go source file",78,".go files contain source code written in the Go (Golang) programming language. You can open them in code editors (for reading/editing) or build/run them with the Go toolchain.",[13,14,15,16,17],{"ext":113,"name":114,"category":7,"categoryName":8,"popularity":115,"summary":116,"howToOs":117},"tsx","TypeScript JSX (TSX) source file",75,".tsx is a TypeScript source code file that contains JSX syntax, commonly used with React-style UI components. You open it in a code editor (for viewing/editing) and build it with TypeScript tooling (for running in apps).",[13,14,15,16,17],{"ext":119,"name":120,"category":7,"categoryName":8,"popularity":121,"summary":122,"howToOs":123},"kt","Kotlin source file",72,".kt files contain Kotlin source code used to build Kotlin applications (including Android apps) and libraries. You typically open them in a code editor or IDE such as IntelliJ IDEA or Android Studio.",[13,14,15,16,17],{"ext":125,"name":126,"category":7,"categoryName":8,"popularity":127,"summary":128,"howToOs":129},"swift","Swift Source Code",70,".swift is a Swift programming language source file used to write apps and other software. You open it in code editors and IDEs such as Xcode or other text/code editors.",[13,14,15,16,17],{"ext":131,"name":132,"category":7,"categoryName":8,"popularity":133,"summary":134,"howToOs":135},"dart","Dart source code",65,".dart files contain source code written in the Dart programming language. You open them in a code editor/IDE or work with them using the Dart SDK tools.",[13,14,15,16,17],[137,140,143],{"label":138,"to":139},"Home","/",{"label":141,"to":142},"File Extension Index","/file-extension",{"label":144,"to":145},".PROTO","/file-extension/proto","category-code","/category/code","Learn what .PROTO files are, how to open them on every platform, common fixes, and security best practices.",[13,14,15,16,17],[151,154,157,160,163],{"os":13,"label":152,"to":153},"Open .PROTO on Windows","/how-to/open-proto-on-windows",{"os":14,"label":155,"to":156},"Open .PROTO on Mac","/how-to/open-proto-on-mac",{"os":15,"label":158,"to":159},"Open .PROTO on Linux","/how-to/open-proto-on-linux",{"os":16,"label":161,"to":162},"Open .PROTO on iOS","/how-to/open-proto-on-ios",{"os":17,"label":164,"to":165},"Open .PROTO on Android","/how-to/open-proto-on-android",[54,60,66],[57,58],[],"code_runtime",[171,175],{"name":172,"description":173,"affiliateUrl":174},"Avast","Avast offers free and premium antivirus software that protects against viruses, malware, ransomware, and phishing. Scan files before opening them to ensure safety.","https://www.avast.com/lp-aff-consumer-store?expid=inf601",{"name":176,"description":177,"affiliateUrl":178},"Norton","Norton 360 delivers comprehensive antivirus protection, VPN, and identity theft monitoring. Scan files for threats before opening to keep your device secure.","http://buy.norton.com/aff_home?utm_campaign=en-ww_nor_n36_aff_nas_nau_nah_cj_nad_low:_sec_nat_mktc_norton_360"]