Protobuf to TypeScript
NewConvert Protocol Buffer .proto message and enum definitions into TypeScript interfaces.
Paste a .proto file to generate interfaces and enums.
Frequently Asked Questions
What parts of a .proto file does this converter actually understand?
It handles message blocks, enum blocks, nested messages and enums, and regular fields marked repeated, optional, or required. It also strips both // line comments and /* block comments */ before parsing.
What proto features are missing?
There is no support for oneof, map fields, services, RPCs, or import-driven code generation. Anything outside the message-and-enum subset is effectively ignored by this parser.
How are nested message names turned into TypeScript names?
Nested names are flattened by concatenating the path segments. For example, a nested Address inside User becomes an interface named UserAddress.
How are protobuf scalar types mapped?
Most numeric protobuf scalars, including int64 and uint64, become TypeScript number. bool becomes boolean, string stays string, and bytes becomes Uint8Array.
Does it validate field-number rules like reserved ranges or duplicates?
No. It reads the field tags so it can parse message fields, but it does not enforce protobuf compiler rules such as uniqueness or reserved-number restrictions.