OpenAPI-based binary serialization library that reduces API payload size by up to 3.5x compared to JSON.
Compactr is an OpenAPI-based binary serialization library that converts JSON-like data into compact binary formats. It solves the problem of large API payload sizes by reducing bandwidth usage by up to 3.5x compared to standard JSON while maintaining compatibility with existing OpenAPI 3.x schemas.
API developers and backend engineers who need to optimize network bandwidth and reduce latency in data-heavy applications, particularly those already using OpenAPI specifications.
Developers choose Compactr because it provides significant bandwidth savings without requiring schema changes, supports API-specific data types like UUID and dates efficiently, and has zero dependencies with a tiny bundle size.
OpenAPI based binary serialization
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses existing OpenAPI 3.x schemas without additional definitions, making it easy to integrate into API projects that already use OpenAPI specifications.
Reduces API response sizes by up to 3.5x compared to JSON, as shown in benchmarks, ideal for bandwidth-constrained applications like mobile or real-time systems.
Includes specialized field types for UUID, date-time, and IP addresses that are encoded efficiently into fixed bytes, optimizing common API data formats.
Has no dependencies and bundles down to approximately 5KB, minimizing overhead and simplifying deployment in lightweight or microservice architectures.
Benchmarks show it operates at 167 ops/sec compared to JSON's 379 ops/sec and protobuf's 358 ops/sec, making it less suitable for scenarios where serialization speed is paramount.
Only supports local component references ($ref), not remote ones, which restricts schema reuse and management in distributed or complex API ecosystems.
Encodes data into non-human-readable binary format, requiring additional steps or tools for inspection compared to JSON, which can complicate debugging and interoperability.