finds.dev

toon-format/toon

🎒 Token-Oriented Object Notation (TOON) – Compact, human-readable, schema-aware JSON for LLM prompts. Spec, benchmarks, TypeScript SDK.

View on GitHubHomepage ↗

★ 24,975TypeScriptMITupdated Jul 2026

// the take

TOON is a new serialization format for feeding structured data to LLMs that cuts tokens by combining YAML-style indentation with CSV-style tabular rows for uniform arrays. The headline claim is ~40% fewer tokens than JSON with comparable comprehension accuracy. It's aimed at developers who are paying real money for context and are passing lots of structured data in prompts.

- The benchmarks are unusually honest: 5,856 LLM calls across 4 models, 13 datasets, 244 questions, with Wilson confidence intervals on every number. Most format-comparison projects cherry-pick one model and one dataset.

- The [N] length and {fields} header annotations are genuinely novel — they give models explicit structural metadata that lets them detect truncation and width mismatches in ways JSON, YAML, and CSV fundamentally cannot. The structural validation dataset numbers (TOON 100%, JSON 0-75%) demonstrate this concretely.

- Token savings are real for the target case: 41-66% vs JSON for high-tabular-eligibility datasets. The flat-only track stays within 6% of CSV while adding structure that actually helps models.

- The ecosystem is surprisingly complete for a format this new: TypeScript SDK, CLI, VS Code extension, tree-sitter grammar, Python/Go/Rust/.NET implementations, a playground, and a versioned spec. Someone put serious work in.

- The accuracy advantage is statistically thin — TOON 72.2% vs JSON-pretty 71.4%, both with ±2.8% confidence intervals that overlap. The real pitch is cost reduction, not comprehension improvement, and the README buries that.

- The format degrades badly when data isn't clean enough to tabulate: semi-uniform event logs (50% eligibility) show TOON using 19.9% MORE tokens than compact JSON. If you don't know ahead of time how uniform your data is, you need to analyze it before choosing the encoding.

- The spec is explicitly unstable ('nothing's set in stone') while the star count is enormous. A breaking spec change at v5.0 will strand everyone who built parsers against v4.0, and there's no backwards-compatibility story described.

- You're adding a dependency and a new syntax that models need to be taught via examples in your system prompt — the integration guide admits you need to show a worked example before TOON clicks. For small payloads or one-off prompts, the overhead of explaining the format likely erases any token savings.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
24,975
Forks
1,108
Language
TypeScript
License
MIT
Last commit
24 Jul 2026

// nearby

If toon isn't quite it.

All repos →