CSV to TOON Converter
Convert CSV to TOON (Token-Oriented Object Notation) online to cut LLM prompt tokens. Paste or drop a CSV file and get compact, typed TOON. Free, private, in your browser.
π Runs entirely in your browser β nothing is uploadedTurn spreadsheets into token-efficient TOON
When you send tabular data to ChatGPT, Claude, Gemini or a local model, every token costs money and context window. JSON repeats every field name on every row and adds braces, quotes and commas; raw CSV is compact but loses structure, types and the guarantee of how many rows there are. TOON (Token-Oriented Object Notation) sits in between: it encodes the same data model as JSON, but writes a uniform array once as a table header such as rows[3]{id,name,email}: followed by one compact line per row. This CSV to TOON converter does that transformation in your browser using the official TOON library.
Paste CSV, drop a .csv or .tsv export from Excel, Google Sheets or a database, or load the sample. The delimiter is detected automatically and quoted cells with commas or line breaks are parsed correctly. The output is ready to paste into a system prompt, a RAG context or an agent tool response.
Types, nesting and options
With Detect numbers & booleans on, values like 42, 3.5 and true are written as real TOON numbers and booleans and empty cells become null, while ZIP codes with leading zeros and long IDs stay as text. Nest dotted headers turns columns like address.city into nested objects. The Wrap in key field names the array (rows[3]{β¦}:); clear it to emit a root-level array. Switch the TOON delimiter to tab or pipe when your cells contain many commas β it avoids quoting and often saves even more tokens.
Tips for using TOON with LLMs
Tell the model the data is TOON and that [N] is the row count; when asking for TOON back, show a header for the format you expect. Decode and validate the model's reply with TOON to JSON in strict mode, or turn it back into a spreadsheet with TOON to CSV. Need other formats from the same sheet? Try CSV to JSON, CSV to YAML or CSV to XML. Nothing is uploaded β your data stays on your device.
How to use
- Add your CSVPaste CSV or TSV text, drop a .csv file, or click Load sample. The delimiter is detected automatically.
- Choose TOON optionsSet the wrapping key (or leave it empty for a root array) and pick a comma, tab or pipe delimiter.
- Use it in your promptCopy the TOON into your LLM prompt or download it as a .toon file.
Frequently asked questions
What is TOON?
rows[3]{id,name}: followed by one line per row.How many tokens does TOON save compared with JSON?
Why convert CSV to TOON instead of pasting CSV?
[N]) and field list explicit, supports nested objects and types, and can be decoded back to exact JSON, so models make fewer structural mistakes and you can validate their answers.