Instant data transmission across any distance

Schema-aware, high-performance JSON serialization for TypeScript. Faster than SuperJSON. Zero runtime overhead with schema-sync.

Quick start
import { serialize, deserialize } from 'fatline'

const data = { createdAt: new Date(), roles: new Set(['admin']) }
const json = serialize(data)
const back = deserialize(json)

back.createdAt instanceof Date  // true
back.roles instanceof Set       // true

Why fatline?

SuperJSON

18.2 KB
275ms round-trip
{
  "json": { "users": [...] },
  "meta": {
    "values": {
      "users.0.createdAt": ["Date"],
      "users.0.roles": ["set"]
    }
  }
}

fatline

12.4 KB
83ms round-trip
{
  "users": [{
    "id": "1",
    "createdAt": 1704067200000,
    "roles": ["admin"]
  }]
}
// Zero metadata needed

Zero Config

Just works with Date, Set, Map, BigInt, and more. No setup required.

Schema-Aware

With Zod schemas, eliminate all runtime overhead. Zero metadata on the wire.

Framework Adapters

Drop-in transformers for tRPC, oRPC, and Hono.

Tiny Bundle

3.5KB gzipped. Tree-shakeable. No dependencies.

Ready to go faster?

Drop-in replacement for SuperJSON in 30 seconds.

npm install fatline