Protobuf Schema Viewer

Paste a proto2 or proto3 file to explore every message and RPC, see wire types and JSON names, catch field number mistakes and copy example JSON.

Körs i din webbläsare. Dina filer lämnar aldrig din enhet. Se hur du kontrollerar det

…

Så gör du

  1. 1
    Paste the file

    Paste or open a .proto file.

  2. 2
    Read the summary

    See syntax, package, imports, options and counts.

  3. 3
    Browse messages

    Search and select a message to see its fields.

  4. 4
    Copy sample JSON

    Copy or download the example for one or all messages.

  5. 5
    Review services

    Check RPCs, streaming modes and gRPC paths.

  6. 6
    Fix checks

    Open Checks and correct errors before running protoc.

Om det här verktyget

Protocol Buffers schemas are compact, but large .proto files with nested messages, oneofs, maps, reserved ranges and several services quickly become hard to read. Developers working with gRPC or protobuf-based events often need to answer simple questions: which number does this field have, what does its JSON name become, which fields were reserved, what does a valid request look like as JSON. This viewer parses a .proto file in the browser, presents messages and enums as a browsable tree, shows each field's number, label, type, JSON name and wire type, lists every service and RPC with its streaming mode and gRPC path, and generates a sample JSON object for each message following the canonical proto3 JSON mapping. It also checks the rules that protoc enforces and the style guide recommends, so mistakes such as duplicate numbers or reusing a reserved field show up before code generation.

Messages and fields

Select a message to see fields sorted by number with their label (optional, repeated or required), type, the lowerCamelCase JSON name (or the json_name option), and the wire type used on the wire: varint, 64-bit, length-delimited or 32-bit. Oneof members and reserved numbers and names are shown. Nested messages and enums appear with their full names.

Sample JSON

Samples follow ProtoJSON: field names in lowerCamelCase, 64-bit integers as strings, bytes as base64, enums by name, maps as objects, and well-known types such as Timestamp, Duration, wrappers, Struct and FieldMask in their special JSON forms. Only the first member of each oneof is filled. Recursive messages stop after a few levels. Download one sample or all of them as a single JSON file.

Services

Each RPC shows request and response types, whether it is unary, client streaming, server streaming or bidirectional, and the HTTP/2 path a gRPC client calls, such as /shop.orders.v1.OrderService/GetOrder.

Checks

Errors cover duplicate field numbers and names, numbers outside 1 to 536,870,911, the 19000 to 19999 range reserved by the implementation, use of reserved numbers or names, required in proto3, missing labels in proto2 and proto3 enums whose first value is not zero. Notices cover style: lower_snake_case field names, an _UNSPECIFIED zero value, and keeping numbers 1 to 15 for frequent fields because they encode in one byte.

Limits

One file is parsed at a time, so types from imports show as unresolved unless they are well-known types. Custom options are skipped, extensions and proto2 groups are not modelled, and editions files are read with proto3-style rules. Use protoc or buf for authoritative compilation and code generation.

Lösta exempel

An orders.proto file with 6 messages, 1 enum and 3 RPCs parsed with no errors. The Order message listed order_id as field 1 with JSON name orderId, total_cents as an int64 sent as the string 1234567890 in JSON, and a oneof payment with card and voucher_code. The WatchOrders RPC showed as server streaming at /shop.orders.v1.OrderService/WatchOrders. Adding a field numbered 13 produced an error because 12 to 14 were reserved, and changing STATUS_UNSPECIFIED from 0 to 1 produced the proto3 rule error that the first enum value must be zero.

I korthet

Vanliga frågor

Which syntax versions are supported?

proto2 and proto3, and files that declare an edition are read with proto3-style rules. Groups from proto2 are not supported.

Why are int64 values strings in the sample?

The ProtoJSON mapping writes 64-bit integers as strings because JavaScript numbers cannot hold every 64-bit value exactly.

What are wire types?

They tell a decoder how to read the next value: varint for most integers, bools and enums, length-delimited for strings, bytes, messages and packed lists, and fixed 32 or 64 bits for fixed and floating types.

Why reserve field numbers?

Reusing the number of a deleted field makes old data decode into the wrong field. Reserving the number and name prevents that.

Can I decode binary protobuf data here?

Not in this tool. It reads schemas only. Use a raw wire-format decoder for binary messages.

Is my .proto file uploaded?

No. Parsing happens in your browser and the text is kept as a local draft.

Helt gratisIngen avgift, ingen registrering
Filer förblir privataAllt körs i din webbläsare
Enkelt på ditt språkFinns på många språk