Encode a payload
Paste JSON and the MessagePack bytes appear as hex or Base64, with a download button for the raw file. Every value takes the shortest encoding that holds it, so 0 is one byte, 200 is two, and a 5-character key is six.
{"compact": true, "schema": 0} becomes 82a7636f6d70616374c3a6736368656d6100, 18 bytes against 30 for the JSON text.
Where the savings come from
MessagePack drops quotes, colons, commas, and braces, and stores lengths as counts instead of delimiters. Short strings cost one byte of overhead, small integers cost none at all beyond their own byte.
Payloads full of long unique strings save almost nothing, because a string is stored verbatim in both formats. Payloads full of small numbers, booleans, and repeated short keys save the most. The size comparison under the output makes that concrete for the payload in front of you rather than in general.
Types JSON cannot express
Timestamps, byte strings, and extension types exist in MessagePack but have no JSON spelling, so they cannot be produced from a JSON source here. A decoder reading them back will show them correctly; an encoder cannot invent them.
Integers larger than 2^53 are the other gap. JSON parsing rounds them before the encoder sees the value, so send those as strings if the exact digits matter.