Tested tool guide
Tested browser tools
Checked August 16, 2026
What Protocol Buffers Formatter does, with a checked example
This tool takes a .proto file and re-emits it in canonical protobuf style: two spaces of indentation, single spaces around every equals sign, and message fields sorted by ascending tag number, following Google's protobuf style guide. It also checks the file against the proto3 grammar and reports syntax errors. The surprise is that the reordering is real, not decorative: the binary format addresses fields by number, so declaration order is pure presentation and the tool moves fields freely - but it never changes the numbers themselves.
Worked example
A concrete input and expected output from the current implementation.
Input
syntax="proto3";
package demo;
message Person {
repeated string emails=5;
int32 age=2;
string name=1;
enum Status {
UNKNOWN = 0;
ACTIVE = 1;
INACTIVE = 2;
}
}
->
Expected output
syntax = "proto3";
package demo;
message Person {
string name = 1;
int32 age = 2;
repeated string emails = 5;
enum Status {
UNKNOWN = 0;
ACTIVE = 1;
INACTIVE = 2;
}
}
The fields were declared in tag order 5, 2, 1 with ragged indentation and cramped equals signs; the output normalizes indentation to two spaces per level, adds the single spaces, and sorts the fields by ascending tag number, leaving names, types, and numbers untouched. The nested enum gets the same treatment one level deeper.