logo JSON BinPack

JSON BinPack

Binary JSON for the Internet of Things

An open-source binary JSON serialization format based on JSON Schema with a strong focus on space-efficiency. Transmitting smaller payloads reduces operational costs and improves user experience.

JSON, JSON Schema and JSON BinPack buffer example

Let me know when its ready!

In early 2022, we built a proof-of-concept implementation to show the potential of JSON BinPack. Now, we are working on a production-ready C++ open-source implementation with bindings to many popular programming languages.

JSON BinPack bindings

Subscribe to our mailing list to show your support and be the first to try out the new implementation.

You may unsubscribe at any time. Your data will always be protected under the GDPR.

Highly Space-efficient

A reproducible benchmark study has proven JSON BinPack to be space-efficient in comparison to 12 alternative binary serialization formats in every considered case. Additionally, JSON BinPack typically provides higher average size reduction than general purpose compressors such as GZIP, LZMA and LZ4 with the highest compression levels.

Take a look at the benchmark
Example of benchmark plots

Based on JSON Schema

JSON BinPack adopts the industry-standard schema language for JSON documents. Re-use the same schemas you already have in your OpenAPI, AsyncAPI, RAML or other specifications. No need to learn more domain-specific schema languages or attempt to translate between them.

Learn more about JSON Schema
Logs of specifications using JSON Schema

Optional Schema

JSON BinPack is a hybrid serialization format that runs in both schema-driven and schema-less modes. JSON BinPack allows you to be as loose or specific as your use case demands, even within the same document, without having to use different serialization technologies.

Read more about the architecture of JSON BinPack
Illustration of JSON Schema as a hybrid serialization format

Frequently Asked Questions

How does JSON BinPack compare to compression formats like GZIP?

Our reproducible benchmark study shows that the semantic information provided by detailed schema definitions enables a serialization format such as JSON BinPack to often outperform general-purpose compressors configured with even their highest supported compression levels, specially for small and medium-sized JSON documents. For large JSON documents, you can experiment combining JSON BinPack with a compression format to potentially achieve greater space-efficiency.

JSON BinPack is space-efficient, but what about runtime-efficiency?

When transmitting data over the Internet, time is the bottleneck, making computation essentially free in comparison. JSON BinPack particularly excels at improving network performance when transmitting data through unreliable and low-bandwidth connections on mobile and IoT systems.

If your use-case demands runtime-efficiency or zero-copy serialization, such as in the case of intra-service or inter-process communication, we suggest you consider alternative serialization formats such as FlatBuffers and Cap'n Proto.

How does JSON BinPack handle unknown fields?

JSON BinPack serializes any instance that matches its JSON Schema definition. JSON Schema is an expressive constrain-based language that permits schema-writers to be as strict or loose on defining data as they wish. As a consequence of adopting JSON Schema, JSON BinPack elegantly supports encoding free-form data and unknown fields as long as the corresponding JSON Schema definition successfully validates the data.

However, deserializing data that does not match the given JSON Schema definition is undefined behavior and will likely result in an exception being thrown.

Do you have further questions or feedback? Don't hesitate in reaching out on GitHub Discussions!


JSON BinPack is the result of extensive binary serialization research at the Department of Computer Science of University of Oxford. The project is led by Juan Cruz Viotti, a computer scientist with first-hand exposure at the problem of space-efficient network communication in the context of IoT and APIs, under the supervision of Mital Kinderkhedia.

2022 JSON BinPack: A space-efficient schema-driven and schema-less binary serialization specification based on JSON Schema Dissertation
2022 A formal taxonomy to classify JSON documents based on their size, content, structure and redundancy criteria Project
2022 A benchmark of JSON-compatible binary serialization specifications Paper
2022 A survey of JSON-compatible binary serialization specifications Paper