# Token-Oriented Object Notation (TOON)

TOON is a compact, human-readable text encoding of the JSON data model, designed to use fewer tokens than JSON when passed to a language model while keeping structure easy to parse and validate.

Token-Oriented Object Notation (TOON) is a compact, human-readable encoding of the JSON data model, built to minimize the tokens a language model spends on structure. It combines YAML-style indentation for nested objects with CSV-style tabular rows for uniform arrays of objects, which is where it saves the most tokens compared with JSON.

A TOON document can declare a field list once in a header line and then list one row per array element, including nested field groups and keyed tabular data such as configuration maps or records addressed by ID. For deeply nested or non-uniform data, the project notes that JSON can still be more efficient.

TOON is meant as a translation layer: an application keeps using JSON internally and encodes it to TOON only for LLM input. It ships as a TypeScript SDK and a command-line tool, with benchmarks comparing token counts against JSON.

Website: https://toonformat.dev
