CSV to TOON Converter

Transform your CSV data into the clean, token-efficient TOON format.

What is the CSV to TOON converter?

This tool reads your CSV - using the header row as field names - and re-encodes the rows as TOON, a compact, indentation-based notation built to save tokens when you hand structured data to a language model. Tabular data is where TOON shines, because the field names are written once instead of repeating on every row like they would in JSON.

Each conversion is measured with the cl100k_base tokenizer used by GPT models, so you can see the exact token saving for your file.

How to use the CSV to TOON converter

  • 1. Paste your CSV (with a header row) into the Input CSV field.
  • 2. Pick a delimiter (comma, pipe or tab) and an indentation style.
  • 3. Optionally turn on length markers.
  • 4. The TOON Output updates as you type - click Copy to grab it.

Features

  • Reads CSV with the first row as column headers.
  • Compact TOON output that lists field names once for the whole table.
  • Choice of delimiter and indentation.
  • Live token savings from a GPT-style tokenizer.
  • Free to use, no sign-up.

When to use it

Good for getting a spreadsheet export or query result into a prompt cheaply - product tables, user lists, analytics rows. Because TOON states the columns once, a CSV with hundreds of rows turns into far fewer tokens than the equivalent JSON array.

FAQ

Does my CSV need a header row?

Yes. The first row is read as field names, and each following row becomes a record using those names, so a header row is required for correct output.

Why is TOON good for tabular data?

Because the column names are written once for the whole table instead of on every row, which is where most of the token savings on CSV-style data come from.

How are token savings measured?

The tool counts tokens with the cl100k_base encoder used by GPT-3.5 and GPT-4 and compares the CSV and TOON counts to show the percentage saved.

Is my data uploaded?

Yes. The conversion runs on our server, so your CSV is sent there to be processed and is not stored. Avoid pasting sensitive records you would rather keep local.

Related tools