toonkit

toonkit

Compact, typed text format for APIs — fast to parse, easy to read.

Simple: TOON is a compact, typed text format for APIs. toonkit is the JavaScript toolkit that makes it easy to use TOON everywhere — in the browser, in Node servers, and in HTTP clients.

What it provides: a fast parser (TOON → JS), a serializer (JS → TOON), a convenient fetch helper and axios helpers for clients, plus server adapters for Express, Fastify, Hono and Next so frontends and backends can share the same compact format.

The TOON story

For years, I kept toonkit as my secret weapon in Bengaluru's IoT labs – powering 1000s of health trackers with lean telemetry that JSON couldn't touch.

JSON? Bloated repeats of "device_id", "battery" every row – 145 bytes crushed buffers, drained batteries. Normal toon formats? Great theory, but no JS parser, no browser magic.

My toonkit: Schema once (table-style), type codes ( s→string, n→number, b→boolean), then infinite rows. Shrinks to 90 bytes. toon is the format.toonkit is my battle-tested npm lib that parses it to typed JS objects instantly. JSON repeats; we don't.

Now opening it up – from internal hero to open source. Libraries.io even auto-listed it (I never submitted)! Star the revolution: ⭐

Built for IoT
By Manoj Gowda
🚀 Open Source
Lightweight
Type Safe
API Friendly
Human Readable
npm i toonkit

✓ Smaller payloads & faster parsing

✓ Schema + types + compact structure

✓ Perfect for APIs, bots & automation

✓ Frontend ⇄ Backend symmetry