Protobuf Fixer
Repair broken .proto files online — fix missing semicolons, unclosed braces, bad syntax declarations, and tag errors.
What is Protobuf Fixer?
Got a broken .proto file? protoc errors out on a single missing semicolon, an unclosed message body, or a stray brace, and the rest of the file becomes useless until you find it. This tool reads malformed Protocol Buffers schemas and fixes those issues automatically — paste it in and we hand back a clean version.
It checks the things protoc trips on first: a missing syntax = "proto3"; at the top, missing semicolons on field lines, unbalanced {} in nested message/enum bodies, and quote/import issues. The output follows the same rules described in the official proto3 language guide and the proto3 grammar reference, so what you get back is a schema protoc will actually accept.
No file uploads, no schema sharing — your .proto stays in this tab. Fix it in seconds and get back to generating bindings.
How to Use the Protobuf Fixer
Three steps. Works on schemas pulled from a repo, copied out of a code review, or hand-edited and now broken.
Paste Broken .proto or Load Sample
Drop the broken schema into the left editor. Hit Sample .proto to load an example with the typical mistakes — a missing semicolon after a field, a message body that never closes, and a stray missing semicolon on the syntax line. Example of broken proto:
syntax = "proto3"
message LineItem {
string sku = 1;
int32 quantity = 2
double unit_price = 3;Two errors here: no semicolon after the syntax declaration, and the LineItem block never closes. Both are typical of what the fixer repairs.
Click Fix Protobuf!!
Hit the green Fix Protobuf!! button. The fixer reads the schema, restores missing semicolons, balances {} braces, normalizes the syntax declaration, and quotes imports correctly. Field tags, names, and types are left alone.
Review Fixed Output
The right pane has the repaired .proto. Drop it back into your project and run protoc to confirm. For schemas that drive RPC services, also sanity-check the result with our Protobuf Validator before generating bindings. Everything runs in your browser — the schema is never stored.
When You'd Actually Use This
Salvage a Hand-Edited Schema
You added a new field, accidentally deleted a brace, and now protoc reports errors three messages further down. Paste the file in, get the brace back, and keep moving — instead of hunting through a 400-line schema by eye.
Fix LLM-Generated .proto
Asked an LLM to draft a .proto from a JSON sample? The structure is usually right but it forgets syntax = "proto3";, drops semicolons, or wraps things in markdown fences. The fixer cleans those up.
Repair After a Bad Merge
Conflict markers got resolved sloppily and the .proto won't compile. Run it through the fixer to put the structure back together so you can review the actual semantic diff in Git instead of fighting syntax.
Recover Schemas from Logs or Docs
Pulled a .proto out of a wiki page, an old PR description, or a screenshot OCR? The text usually has stray characters and broken indentation. The fixer brings it back to something protoc accepts.
Common Questions
Is my .proto file stored or sent anywhere?
Your schema is sent to our backend only to run the repair, and we don't persist it — once the response comes back, it's gone. Nothing is logged with your data, and there are no third-party trackers in the request path. If you have a sensitive schema (internal services, unreleased APIs), redact identifiers before pasting, the same way you would when sharing it in a public bug report.
What kinds of errors does it actually fix?
The common ones protoc rejects: missing or wrong syntax declaration (it adds syntax = "proto3"; if absent), missing semicolons on field/option/enum lines, unbalanced {} in message/enum/service blocks, missing or mismatched quotes on string options and imports, and obvious typos in keywords like repeated or optional.
Will it change my field tag numbers or rename anything?
No. The fixer is told explicitly to repair syntax only — never to rename messages/fields, change tag numbers, or invent new fields. Tag numbers are part of your wire format; touching them would break backwards compatibility. If the output ever looks like it changed semantic content, treat that as a bug and don't commit it.
Does it support proto2 as well as proto3?
Yes for the syntax-level fixes — missing semicolons, unbalanced braces, and bad syntax declarations are handled the same way regardless. The fixer respects whatever is on the syntax line; it won't flip a proto2 schema to proto3 (those have different semantics around required/optional and defaults).
Why not just run protoc and read the error?
You should — protoc is the source of truth. But its errors point at one location at a time, and one missing brace can cascade into ten downstream errors. The fixer is for when you want the whole file unblocked in one pass, then you re-run protoc to confirm. Think of it as a first sweep, not a replacement.
Can it handle large schemas with many imports?
Yes, up to a few thousand lines per request. The repair only looks at the file you paste — it does not chase import statements or fetch external schemas. If your schema imports google/protobuf/timestamp.proto or other well-known types, those imports are preserved as-is.
Other Protobuf Tools
Fixing the syntax is the first step. Once the schema compiles, these tools take it the rest of the way: