thoughtasylumTOOLBOX Preview Guides Use offline Automate Feedback

Tools › Encoding

Binary Data Decoder

Paste hex or Base64, or choose a file, and see Protobuf, CBOR or MessagePack data decoded without a schema: Protobuf as protoc --decode_raw shows it, CBOR and MessagePack in CBOR’s diagnostic notation, or any of them as JSON.

About this tool What it's for, how to use it and an example

What it's for

See what’s inside binary data that was packed by a program rather than written for people. Protocol Buffers (Protobuf) is used by gRPC and many Google and mobile apps, CBOR by passkeys (WebAuthn), COSE and many devices, and MessagePack by caches, queues and games. All three turn up as hex or Base64 in logs, network captures and cookies.

For example, when a gRPC call fails and the log shows only a Base64 payload, paste it here to see the field numbers and values it carried, without needing the .proto file.

How to use it

Paste hex or Base64, or choose a file or drop one on the page. Hex may have spaces, colons, commas, 0x or \x between the bytes. With The input is on detect, text made only of hex digits in pairs is read as hex and anything else as Base64 (standard or URL-safe), so choose Base64 for Base64 that happens to use only hex digits.

With Format on detect, each format is tried in turn, and the message says if the data also decodes as another one. Show as gives a tree, or JSON for another tool: bytes become hex text, numbers too big for JavaScript become text, and Protobuf fields are keyed by number, with an array for a field that repeats. The input is and Show as are remembered.

Example

Paste this, the examples from Google’s Protobuf encoding guide, one after another:

08 96 01 12 07 74 65 73 74 69 6e 67 1a 03 08 96 01

It’s decoded as Protobuf with 3 top-level fields: field 1 is 150, field 2 is "testing", and field 3 is a message whose field 1 is 150. Each number also shows sint 75, what it would be if the field were a sint32.

Good to know

Protobuf data doesn’t say what its fields are, so the tree shows field numbers, not names, and the type is a guess: a varint could be a number, a bool or an enum, and a length-delimited field is shown as text when it’s all printable, otherwise as a nested message if it reads as one, otherwise as bytes. Packed repeated numbers look like bytes or a short message. Each number is shown with its other readings (signed, sint, float or double), so pick the one that fits.

Detecting the format is a best guess: short data can be valid in more than one, and a run of several CBOR or MessagePack values is only read as such when you choose that format. Files over 16 MB aren’t read.

Guides: Decoding Base64, URL and other encoded text, and escaping it · Debugging a failing API call · What is this file?

Without a schema, field names and types can’t be known: Protobuf shows field numbers, and each value as it’s most likely meant.

Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.

Saved you a few minutes? Say thanks with a coffee.

Something wrong with this tool, or missing from it? Report a bug or suggest a feature.

↑ ↓ move↵ openesc close