JSON to MessagePack
Paste or drop your data here, or open a file.
New to Bracely?
Everything stays in your browser.
Output appears here
Paste or open your data in the input box. It never leaves your browser.
JSON to MessagePack
MessagePack is a binary JSON: the same data in fewer bytes, used by Redis, Fluentd, SignalR and many RPC and game protocols. Paste JSON to get its MessagePack bytes and see the size next to the JSON's.
Example: a sensor reading
A small telemetry message, the kind a device sends many times a minute. As MessagePack it takes 51 bytes instead of the minified JSON's 72, and the 64-bit timestamp in nanoseconds keeps every digit:
Input
{
"device": "pump-7",
"tempC": 41.5,
"ok": true,
"tsNanos": 1793268000123456789
}Output
84a6646576696365a670756d702d37a574656d7043cb4044c00000000000a26f6bc3a774734e616e6f73cf18e2f7beb66f0d15
How do I use the JSON to MessagePack?
- Paste JSON.
- Pick Base64 or hex output.
- Copy the bytes, or press Save for a .msgpack file.
What does the JSON to MessagePack do?
- Size compared with the JSON
- Base64 or hex output, or a .msgpack file
- 64-bit integers written exactly
When to use the JSON to MessagePack
MessagePack stores the same data as JSON in fewer bytes and parses faster, which is why Redis, Fluentd, SignalR, many RPC frameworks, games and IoT devices use it. Encoding a JSON sample shows exactly what a client should send, gives test data for a decoder, and tells you how much smaller your payloads would be.
Numbers take only the bytes they need, short strings carry a one-byte length, and true, false and null are one byte each, so small messages shrink most. Integers beyond JavaScript's safe range, such as nanosecond timestamps, are written as exact 64-bit values. Output is Base64 or hex; Save gives a .msgpack file, and MessagePack to JSON reads it back.
Frequently asked questions
- How much smaller is MessagePack than JSON?
- It depends on the data: the note under the output gives the exact sizes. Messages with many numbers and short keys shrink most; long text barely changes, since strings are stored as they are. Compressing JSON with gzip can come close for big payloads.
- Will a big integer lose digits?
- No. A number such as 1793268000123456789 is written as an exact 64-bit integer, although JavaScript's JSON.parse would round it. Bracely keeps the digits from your text.
- Is my data uploaded?
- No. Bracely runs entirely in your browser, so nothing you paste or open leaves your device.
More JSON tools
Bracely has 104 JSON tools in one page. Related ones:
- Query string to JSON
- JSON to .env
- Excel to JSON
- JSON to YAML
- JSON to CSV
- JSON to XML
- JSON to Excel
- YAML to JSON
- CSV to JSON
- XML to JSON
- JSON to TOML
- TOML to JSON
- JSON Lines / NDJSON
- JSON5 / JSONC to JSON
- JSON Schema builder
- JSON Schema validator
- Flatten JSON
- Convert JSON key case
- JSON Formatter
- JSON Validator
- JSON Viewer
- JSON Repair
- JSON Diff
- jq Playground
Runs entirely in your browser. Nothing you paste is uploaded. Made by Saurabh Pagrut · About · Privacy policy
Last updated · Version 6.1 · Changelog
Saurabh Pagrut on GitHub · LinkedIn · X · YouTube · Instagram