Tools/EsotericSoftware/kryo

kryo

Java binary serialization and cloning: fast, efficient, automatic

6.5k ★emergingJavaBSD 3-Clause "New" or "Revised" Licensetrending

The Lens

By Erik Loyd, SaaS CEO and former COO/CFO of an AWS Premier Partner.

Updated Oct 2026

Kryo turns Java objects into compact bytes and back, much faster and smaller than Java's built-in serialization. You rarely see it, but it's inside tools you do: Spark uses it for shuffled and cached data, Hive for query plans, Flink as a fallback serializer. It's free under the BSD 3-clause license.

Setup is a Maven dependency. The work is configuration. By default every class you write must be registered up front. A Kryo instance is not thread safe, so each thread needs its own or you use a pool. The default FieldSerializer stores no schema, so adding or removing a field breaks bytes you already saved; use TaggedFieldSerializer or CompatibleFieldSerializer for anything long-lived. The format assumes Java on both ends. For cross-language or long-term storage, Protobuf or Avro are the safer picks.

There's no paid tier. Solo, small teams, larger teams: free.

The catch: Kryo's own README says it is not designed to make deserializing untrusted data safe. Turn off required registration and a crafted payload can create any class on your classpath. That's how Spring Statemachine shipped a CVE rated 8.8 in June 2026. Keep registration on, and set setMaxArraySize (new in 5.7.0) when reading streams.

Free vs Self-Hosted vs Paid

fully free

Free: Everything. BSD 3-clause license, published on Maven Central as com.esotericsoftware:kryo (or the dependency-free com.esotericsoftware.kryo:kryo5 jar for use inside other libraries). Development is sponsored by the Gecko fund.

Self-hosted: Nothing to host. It's a Java 8+ library you add as a dependency. The effort is configuration: registering classes, one Kryo instance per thread (or a pool), and picking a serializer that tolerates class changes if you store data long-term.

Paid: There is no paid tier, support plan or hosted service.

Free under BSD 3-clause with no paid tier. The cost is engineering time on registration, thread safety and schema changes.

What to do by team size

Solo
free; a Maven dependency
Small team
free; keep class registration on
Medium team
free; standardize a Kryo pool and a compatible serializer for stored data
Large team
free; never deserialize untrusted input, and audit any framework that turns registration off
Self-hosting ops:trivial

Get tools like this every Wednesday

One featured tool, three on the radar. No fluff.

Score
78/100 · B+
Adoption21/30
Maintenance25/25
Community7/20
License15/15
Analysis10/10

A low score is not a verdict on quality. Young and niche tools start low by design. How we calculate scores

Trust Signals

Organization account (33 public repos)

About

Owner
Esoteric Software (Organization)
Stars
6,547
Forks
847

Explore Further

More tools in the directory