Analysis updated 2026-05-18
Reduce token costs when sending structured data to GPT or Claude APIs by using TOON instead of JSON.
Fit more data into an LLM's context window by compressing prompts with schema-aware encoding.
Build chatbot or AI agent systems that need to pass structured configuration or records to language models efficiently.
| toon-format/toon | felixrieseberg/windows95 | qwenlm/qwen-code | |
|---|---|---|---|
| Stars | 24,138 | 24,126 | 24,206 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | easy | moderate |
| Complexity | 2/5 | 2/5 | 2/5 |
| Audience | developer | general | developer |
Figures from each repo's GitHub metadata at analysis time.
TOON (Token-Oriented Object Notation) is a compact, human-readable data format designed as an alternative to JSON, specifically optimized for use in prompts sent to large language models (LLMs) like GPT or Claude. The core problem it addresses is that JSON, while widely used, is verbose, it uses a lot of repeated characters like braces, quotes, and colons that waste tokens. In LLM APIs, you pay per token and models have limited context windows, so a more compact format means lower cost and more data fitting in the same space. TOON is schema-aware, meaning it knows the structure of your data upfront and can omit redundant labels, producing shorter output that still carries the same information. The project includes a specification defining the format and a TypeScript SDK for working with it in code. Benchmarks are included to demonstrate how much more compact TOON is compared to standard JSON. You would use TOON when building applications that feed structured data into LLM prompts and want to reduce token usage without sacrificing readability or structure. It is written in TypeScript.
A compact, human-readable data format that replaces JSON to reduce token usage in LLM prompts, saving costs and context space.
Mainly TypeScript. The stack also includes TypeScript, Node.js.
Use freely for any purpose including commercial, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.