• ARTICLE
  • STRING
  • CONVERTER
  • ENCRYPT
  • NETWORK
  • MORE
    CHART
    MATH
    COORDINATE
    IMAGE
    FILE
  • ARTICLE
    STRING
    CONVERTER
    ENCRYPT
    NETWORK
    MORE
    CHART
    MATH
    COORDINATE
    IMAGE
    FILE
logo Online Tools
0 Comments Favorite Copy Link Share

Protocol Buffers Encode and Decode Online


The data is processed in the browser and will not be uploaded to the cloud.
Is there a varint length prefix in the data. When encoding and decoding multiple messages, it is necessary to enable the varint length prefix.
Protocol Buffers Encode and Decode Online-summary

Online Protocol Buffer Encoding and Decoding Tool, supporting online decoding of protocol buffer data and online encoding of protocol buffer data. Supports opening multiple proto definition files and decoding and encoding multiple messages.

Protocol Buffers Encode and Decode Online-instructions

Online Protocol Buffers encoding and decoding tool, supporting input of JSON format data, encoded as protobuf binary messages. Supports inputting protobuf binary data in hex, base64, and binary formats, and decoding it into JSON data. Supports encoding and decoding single and multiple messages, and supports manual input of proto definitions or opening multiple proto files.

  1. JSON Data: Encode - Input JSON data and encode it into protobuf binary data of the selected message type based on the chosen message type. Only one JSON message data can be input for encoding at a time. Decode - Decode the input protobuf data into JSON format. If the protobuf data contains multiple messages, the multiple messages will be decoded into a JSON array.
  2. Protobuf Data: Encode - Encode the input JSON message into protobuf data, which supports hex, base64, and binary data formats. If the varint length prefix is enabled, a varint length field will be added before encoding each message. Multiple JSON message encoded protobuf binary data will be concatenated together. Decode - Decode the input protobuf binary data into JSON data. Support decoding multi message binary data with varint prefixes.
  3. proto Definition : Support manual input of proto definitions or opening proto files. When opening a proto file, multiple proto files can be opened, and the proto definition text box is set to read-only status. After clicking clear, it will be reset to editable status.
  4. Protobuf Data Format : Protobuf is a binary data format that supports hex, base64, and binary. When opening the protobuf data file, the binary file content will be converted to the selected data format.
  5. Message Type : Select the protobuf message type used for encoding and decoding. When the refresh button is clicked, the current input proto definition or opened proto file will be parsed, and the message type list will be updated.
  6. varint Length Prefix: Encode - Do you want to add a varint length prefix field before the message. Decode - Does the input protobuf data contain a varint length prefix. If the data contains multiple messages, it must include a varint length prefix.
  7. bytes type note: Encode - Supports input Array.<number>(number is an 8-bit integer with a range of 0-255) or base64 string . Decode - The bytes data will be converted to a base64 string.
  8. Protobuf - JS data type:
    Field type Expected JS type (encode)
    s-/u-/int32
    s-/fixed32
    number (32 bit integer)
    s-/u-/int64
    s-/fixed64
    Long-like (optimal)
    number (53 bit integer)
    float
    double
    number
    bool boolean
    string string
    bytes Uint8Array (optimal)
    Buffer (optimal under node)
    Array.<number> (8 bit integers)
    enum number (32 bit integer)
    message Valid message
    repeated T Array<T>
    map<K, V> Object<K,V>