1. Home
  2. Developer tools
  3. MessagePack to JSON

MessagePack to JSON

MessagePack is a compact binary form of JSON used by Redis scripts, game servers and RPC systems. Paste its bytes as hex or Base64, or open a file, and read them as JSON; encode JSON to see the bytes.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use MessagePack to JSON

  1. Choose the direction.
  2. Paste hex or Base64, or open a file.
  3. Copy the JSON or the bytes.

Features

  • Hex or Base64 input, detected automatically
  • Opens binary files up to 2 MB
  • Integers beyond 2^53 kept exact as strings
  • Binary and extension values shown as labelled objects
  • Encoding picks the smallest form for each value
  • Byte count shown

Supported formats

You can open

  • Hex
  • Base64
  • MessagePack file
  • JSON

You get

  • JSON
  • Hex
  • Base64

Private by design

Your files are opened and processed by your browser on this device. They are never uploaded to openWorkstand or anyone else, so the MessagePack to JSON is safe for contracts, IDs, photos and work documents. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Values JSON cannot hold, such as binary data and extension types, are shown as labelled objects.
  • Files over 2 MB are not opened.

Guide

MessagePack bytes to JSON and back

MessagePack describes the same data as JSON — null, booleans, numbers, strings, arrays and maps — but writes it as bytes, with the type and often the length packed into the first byte of each value. It is used by RPC systems, caches, game servers and scripting engines that want compact messages without a schema. When you meet one in a log, a socket capture or a Redis value, you see hex. This page reads it back as JSON and can write JSON as MessagePack.

How the format works

Every value starts with a type byte. Small positive integers from 0 to 127 are a single byte equal to the number. A string up to 31 bytes long starts with 0xa0 plus its length, followed by its UTF-8 bytes. A map with up to 15 entries starts with 0x80 plus the count and is followed by the keys and values alternately. Larger values use longer forms that carry the length in one, two or four bytes. null, false and true are the single bytes 0xc0, 0xc2 and 0xc3.

Using the page

Pick a direction. For decoding, paste hexadecimal (spaces, 0x and commas are ignored) or Base64, which the page tells apart on its own, or open a file of up to 2 MB. The JSON appears on the right with a byte count. For encoding, paste JSON, choose hexadecimal or Base64 output, and copy the bytes. Errors, such as a message that ends in the middle of a string or an unused type byte, are reported with the offset where they occurred.

Numbers and special values

JSON numbers have no size limit in the text, but MessagePack integers are 8 to 64 bits wide. A 64-bit integer can be larger than a JavaScript number can hold exactly, so values beyond 2 to the 53rd power are shown as strings. Floating-point numbers are read in single and double precision. Binary data, which JSON cannot represent, appears as an object with a $binary key holding the hex. Extension types, used for timestamps and application-defined values, appear as an object with $ext (the type number) and data.

Size compared with JSON

MessagePack is usually smaller than JSON text for data with many numbers and short strings, because it avoids quotes, commas and digits spelled out in text. It saves little when the data is mostly long strings. The page reports the byte count of the binary form so you can compare it with the JSON you started with. When encoding, each value uses the smallest form that holds it, which is what the specification recommends.

A worked example

The Sample button loads 82 a7 63 6f 6d 70 61 63 74 c3 a6 73 63 68 65 6d 61 00, 18 bytes. The first byte 0x82 starts a map with two entries. a7 is a 7-character string, “compact”, and c3 is true; a6 is a 6-character string, “schema”, and 00 is the integer 0. The JSON is {“compact”: true, “schema”: 0}. Encoding the object {“id”: 7, “ok”: true, “tags”: [“a”, “b”]} gives 83a2696407a26f6bc3a47461677392a161a162, which is 19 bytes against 35 characters for the same JSON written without spaces.

Limits

Map keys that are not strings, which MessagePack allows, cannot be JSON keys, so they are shown as text. Timestamps in the standard extension are shown as raw extension data, not as dates. The page handles one message at a time, and a stream of several messages must be split first. Round-tripping binary or extension values may not return the original bytes, since JSON cannot hold them natively.

Checked against the current version of the MessagePack to JSON on .

Troubleshooting

The file does not open

Check that it is one of the supported formats above and opens in another app. Damaged files and password-protected PDFs cannot be read until they are repaired or unlocked.

It is slow or stops on a very large file

Everything runs on your device, so speed depends on its memory. Close other tabs, use a computer rather than a phone, or split the file into smaller parts first.

The download did not start

Look for your browser’s download bar or icon. Some browsers ask once before a site may download files; allow it and click the button again.

Frequently asked questions

How do I read a MessagePack hex dump without a tool?

Look at the first byte of each value. A byte from 0x80 to 0x8f starts a map with up to 15 pairs, 0x90 to 0x9f an array, 0xa0 to 0xbf a short string whose length is in the low five bits, and 0x00 to 0x7f is a small non-negative integer written as itself. Bytes 0xc0, 0xc2 and 0xc3 are null, false and true.

Is it safe to decode MessagePack from an unknown source here?

Yes in the sense that nothing is run: the bytes are only read as data, and a truncated or malformed message produces an error with the offset. The page processes the bytes in your browser and does not upload them.

How much smaller is MessagePack than JSON?

It depends on the data. Small integers take one byte and keys carry no quotes or commas, so objects with many numbers and short strings shrink most, while text-heavy data saves little.

How are binary values shown?

JSON has no byte type, so a binary value appears as an object with a $binary key holding its hex.

Keep working with the result

After you download, choose “Save to Workstand” to keep the result in a folder on your computer, attach it to a project and create a follow-up task. It is saved by your browser, not uploaded.