Indent Protocol Buffer declarations and separate major blocks for a readable .proto file.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
The formatter adjusts a two-space indentation level around braces and inserts blank lines before top-level message, service, enum, and oneof blocks. Comments and declaration text are preserved without parsing a descriptor.
syntax = "proto3";
message User {
string name = 1;
int32 age = 2;
}
syntax = "proto3";
message User {
string name = 1;
int32 age = 2;
}
gRPC interfaces, code-generation schemas, and reviewed API contracts use .proto files.