Skip to content
Marvin's Toolbox.

Protobuf, MessagePack and CBOR Decoder

Decode Protocol Buffers, MessagePack and CBOR data without a schema. Paste hex or Base64, or drop a file, and see every field as a tree mapped back to its bytes, then copy the result as JSON.

Runs entirely in your browser. Nothing you put in here gets uploaded.

Input

Format

Decode as

The format is guessed from how cleanly each one decodes.

Read the text as

Auto tries hex first, then Base64.

Next steps

Send this tool's output straight into another tool.

Paste JSON to explore it as a collapsible, searchable tree, hide the fields you don't need, and see the structure it implies as a badge-annotated schema and a copyable TypeScript interface.

Convert config and data between JSON, YAML, TOML, JSON5, INI, XML, CSV and .env. Type or paste on the left, pick the output format on the right, and copy the result. Includes a format button and a minify toggle.

Compare two JSON documents by structure and see every added, removed and changed key and value with its exact path. Browse the result as a tree, a filterable change list or a line diff, ignore array order, catch type changes and export the changes as a JSON report.

Convert text into every case at once: title case in the APA, AP, Chicago, MLA, Bluebook, AMA and NYT styles, sentence case, upper, lower, camelCase, snake_case, kebab-case and more.

Count words, characters, sentences, paragraphs, lines and more as you type, with estimated reading and speaking time.

Remove duplicate lines from a list or text, keeping the first occurrence. Optionally ignore case and whitespace, or drop blank lines too.

Replace text in two modes: plain find and replace all, or regular expressions with flag controls and capture group references like $1.

Compare two texts and see every added, removed and changed line highlighted, side by side or inline, with the changed words marked within each line. Ignore case, whitespace or blank lines, read a summary of how much changed, and export the result as a unified diff.

Paste a UUID to see what it carries: version, variant, and for time-based versions the exact timestamp, clock sequence and node. Also shows the raw bytes, the 128-bit integer and the URN form.

About the Protobuf, MessagePack and CBOR Decoder Tool

This tool decodes Protocol Buffers, MessagePack and CBOR without a schema. Paste the bytes as hex or Base64, or drop a file, and it guesses the format, then shows every field and value as a tree next to a hex view of the raw bytes.

Every value is tied to the exact bytes it came from. Hover a row and its bytes light up in the hex view, click a byte and the tree jumps to the field it belongs to. The whole result exports as JSON for the JSON Inspector or your own code.

What you can do

  • Decode a Protobuf message without the .proto file
  • Convert MessagePack to JSON
  • Convert CBOR to JSON
  • Read a protobuf varint as signed, zigzag or bool
  • Find which bytes of a payload belong to which field
  • Decode a truncated or corrupt payload as far as it goes

How to use the Protobuf, MessagePack and CBOR Decoder

  1. 1Paste hex or Base64 into the input, or switch to File and drop a .pb, .msgpack or .cbor file.
  2. 2Check the detected format, or pick Protobuf, MessagePack or CBOR yourself if the guess is wrong.
  3. 3Expand the tree and hover rows or bytes to see how they map onto each other.
  4. 4Select a value to see its position, its raw bytes and every other way the bytes could be read.
  5. 5Copy or download the decoded JSON.

Protobuf without a schema

The Protobuf wire format only says how a field is stored, not what it means. A varint could be an unsigned number, a negative int64, a zigzag sint32 or a bool, and a length-delimited field could be a nested message, text, packed numbers or raw bytes. The decoder picks the most likely reading and lists the others next to the selected value.

For length-delimited fields you can switch the reading by hand, for example to see a bytes field as packed varints. Groups, fixed32 and fixed64 values with their float and double readings are supported too.

MessagePack and CBOR

MessagePack is decoded to the full spec, including bin and ext types and the timestamp extension in its 32, 64 and 96 bit forms. CBOR covers all major types from RFC 8949, half precision floats, indefinite length strings, arrays and maps, and common tags such as dates, bignums, decimal fractions, UUIDs and embedded CBOR, which is decoded in place.

Several values in a row are read as a MessagePack stream or a CBOR sequence.

How the JSON export works

Protobuf fields are keyed by field number, and a repeated field becomes an array. Byte strings become Base64, integers beyond what JavaScript can hold exactly become strings, and dates become ISO 8601 text. When decoding stops on bad data, the export holds everything read up to that point.

Tools that share a tag with this one.

Convert config and data between JSON, YAML, TOML, JSON5, INI, XML, CSV and .env. Type or paste on the left, pick the output format on the right, and copy the result. Includes a format button and a minify toggle.

Paste JSON and get matching TypeScript types, with interfaces or type aliases, optional readonly fields and comments showing example values detected in your data. Nested objects become their own named types.

Encode and decode Base16, Base32, Base36, Base45, Base58, Base62, Base64 and Base85. Pick the alphabet variant you need, from Crockford Base32 to Bitcoin Base58 and Ascii85, and convert in either direction.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Format code in JavaScript, TypeScript, JSON, JSON5, HTML, Vue, CSS, SCSS, LESS, Markdown, YAML, GraphQL, XML and SQL. Pick tabs or spaces, set the indent width, and format the input in place with one click.

Convert a color between HEX, RGB, HSL, HSV, HWB, CMYK, OKLCH and OKLAB. Type into any field and the others update as you go, or pick the color visually. Reads CSS color syntax and keeps alpha where the format supports it.