toon_encode
Convert JSON, CSV, XML, and other structured data into TOON format to reduce LLM token usage by 50-70% and lower costs.
Instructions
Convert data to TOON (Token-Oriented Object Notation) format to reduce token usage by 50-70%.
Supports: JSON, CSV, TSV, XML, HTML tables, YAML, and raw objects.
TOON uses a header-based format where field names are defined once:
JSON: {"id":1,"name":"test"} → [id,name]\n1,test
Reduces repetitive keys in arrays of objects
Use this before sending large datasets to LLMs to save tokens and costs.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The data to encode (JSON, CSV, XML, YAML, or other supported format) | |
| format | No | Input format (default: auto-detect) |