What is TOON format?
TOON, short for Token-Oriented Object Notation, is a compact text format that represents the same data as JSON but with indentation instead of braces and with column names written once for lists of similar objects. It is designed for putting structured data into language model prompts using fewer tokens.
Try it: JSON to TOONConvert JSON to TOON, a compact format for LLM prompts, and back.The same data, written differently
TOON describes the JSON data model: objects, arrays, strings, numbers, booleans and null. Anything you can write in JSON you can write in TOON, and you can convert back without losing data. What changes is the syntax.
{
"users": [
{ "id": 1, "name": "Asha", "role": "admin" },
{ "id": 2, "name": "Ravi", "role": "user" }
]
}The same data in TOON:
users[2]{id,name,role}:
1,Asha,admin
2,Ravi,userThe header users[2]{id,name,role}: says there are 2 items and names the fields once. Each following line is one row.
The main rules
- Objects use key: value pairs, and nesting is shown with indentation (two spaces per level).
- Lists of simple values are written on one line: tags[3]: red,green,blue.
- Lists of objects that all have the same simple fields become a table with a header, as above.
- Other lists use a dash for each item.
- Strings are only quoted when needed, for example when they are empty, contain the delimiter or a colon, or look like a number or true/false/null.
Why it can use fewer tokens
Language models read text as tokens. In JSON, every object repeats its keys, and braces, quotes and commas all add tokens. TOON writes the keys once for a table and drops most punctuation, so a long list of uniform records is shorter.
When TOON does not help
The saving depends on the shape of your data. Deeply nested objects, or lists where every item has different keys, cannot use the compact table form, so the result may be close to compact JSON in size. Models may also be more used to JSON in some tasks. Measure on your own data: the JSON to TOON tool shows characters and estimated tokens side by side.
Using TOON in a prompt
Paste the TOON text where you would paste JSON, and say what format it is, for example: "The following data is in TOON format." For output, ask the model to answer in JSON if your code needs to parse it, and keep TOON for the input.
Frequently asked questions
Is TOON a replacement for JSON?
No. JSON remains the standard for APIs and storage. TOON is mainly useful as a compact input format for language model prompts.
Can I convert TOON back to JSON?
Yes. The conversion is lossless for JSON data types. The JSON to TOON tool converts in both directions.
Published 2026-10-23. Last updated 23 October 2026.