What this guide covers
When you send a table of data to an AI model, you pay for the format as well as the data. Brackets, quote marks, tags and repeated column names all count as tokens. On a large table, that extra text can cost more than the values themselves.
Token Intelligence measures this for you. It takes a CSV, Excel or JSON file, writes the same data in seven formats and counts the tokens in each one. It also checks that the cheaper formats keep every value. It runs in your browser, so your data is never uploaded.
This guide walks through one real task from start to finish, using the example data built into the tool, so you can follow along and see the same numbers. It then explains how to read the results, how to choose a format and where the tool helps most.
The worked example: a campaign report for an AI summary
Picture a marketing team that sends its weekly campaign report to an AI model and asks for a short summary of what worked. The report has 12 rows, one for each campaign and channel, and 8 columns: Campaign, Channel, Region, Spend, Impressions, Clicks, Conversions and Live.
Their system exports the report as indented JSON, because that is the default. The question is simple. How much of what they send is data, and how much is format?
The example data in Token Intelligence is this report. It also has a few awkward details on purpose: a campaign name with a comma in it, an accented name, a blank cell and a spend figure written as 1250.50. Real exports have details like these, and they are where a format can change your data without anyone noticing.
Step 1: Choose a token counter
Open Token Intelligence and start on the Your data step. Under Token counter, at the top of the tool, pick the one that matches your model. There are three choices.
- OpenAI o200k_base is exact for the GPT-4o family and newer OpenAI models.
- OpenAI cl100k_base is exact for GPT-4 and GPT-3.5.
- The estimate counts one token for every four characters. Use it for Claude, Gemini and other models whose tokenisers are not public.
For this example, keep the first one, o200k_base. The first count takes a moment while its word list loads.
Step 2: Load the data
Select Use example data. The status line confirms "Example data loaded: 12 rows and 8 columns." With your own data, you would choose a file here instead. Leave the box for keeping numbers and true or false as values ticked for now. We come back to it in step 6.
Step 3: Compare the formats
Select Compare formats. The tool tells you which format is smallest: "Compared. CSV is the smallest at 248 tokens, against 772 for indented JSON." The results table shows all seven formats against indented JSON, which is the baseline.
- JSON (indented): 772 tokens, the baseline.
- JSON (compact): 448 tokens, 42% fewer.
- CSV: 248 tokens, 68% fewer.
- Markdown table: 337 tokens, 56% fewer.
- XML: 1,220 tokens, 58% more.
- YAML: 612 tokens, 21% fewer.
- TOON: 262 tokens, 66% fewer.
Two things stand out. First, two thirds of the indented JSON is format. The same facts fit in about a third of the tokens. Second, the spread is wide. XML costs almost five times as much as CSV for exactly the same report.
Simply removing the spaces from JSON saves 42%, and the result is still valid JSON. That is often the easiest change to make, because nothing downstream has to learn a new format.
Step 4: Check the round trip column
A cheaper format is no use if it changes your data. For JSON, compact JSON, CSV and TOON, Token Intelligence reads the output back and compares every value with the original. In this example, all four show Lossless. XML, YAML and Markdown show Not checked, because the tool does not read those formats back.
If a format ever shows Different, the tool names the first row and column that changed. Treat that as a stop sign for that format until you know why.
Step 5: Preview the TOON output
Under Format, the preview opens on TOON. Here is its header and four of the twelve rows:
[12]{Campaign,Channel,Region,Spend,Impressions,Clicks,Conversions,Live}:
Spring launch,Search,UK,"1250.50",184000,5120,212,true
Spring launch,Social,UK,980,402500,3310,96,true
"Back to school, North",Social,UK,515.25,233400,1875,54,true
Autumn webinar,Search,UK,330,40100,1180,"",true
The header gives the row count and the column names once. Each row after it holds only values. That is why TOON is so much smaller than JSON, which repeats all eight column names on every row.
Look at the details too. The spend of 1250.50 is in quotes, because writing it as a number would drop the final zero and the value would not match the original. The campaign with a comma in its name is quoted, and so is the blank cell. This is how TOON stays lossless, and it is why the round trip check is worth having.
Step 6: Try the numbers setting
Untick Keep numbers and true or false as values, then select Compare formats again. Now every value is treated as text. Indented JSON rises to 784 tokens and TOON to 273, because more values need quotes. CSV stays at 248, since it treats everything as text anyway.
Use this setting when your data has codes that look like numbers, such as product codes or postcodes with leading zeros, and you need them kept exactly as text.
Step 7: Check with a second counter
Switch the counter to cl100k_base and compare again. Indented JSON is 823 tokens, TOON is 265 and CSV is 252. The savings are almost the same at 68% and 69%. The order of the formats holds across both OpenAI counters.
Now try the estimate. It shows About 586 for indented JSON, About 178 for TOON and About 170 for CSV. The ranking is close to the exact one, but the JSON figure is about a quarter lower than the o200k_base count. The tool says so on the page: the estimate is good for comparing formats, and an exact counter is better for a budget.
Step 8: Download or copy the result
Pick the format you want to use, then select Download to save it as a file or Copy to paste it into a prompt. The JSON and CSV are standard. The TOON follows the public specification, so any TOON library can read it.
What the saving means in a real workflow
Saving 510 tokens on one request sounds small. The point is that the same data is rarely sent once.
Say the report feeds an agent workflow with five steps, and each step reads the full table. Sending TOON in place of indented JSON saves about 2,550 tokens per run. At 1,000 runs a month, that is about 2.5 million fewer tokens to pay for, from one report. Your own figures will differ, but the sum is the same: tokens saved per request, times the number of steps, times the number of runs.
Token counts grow roughly in proportion to the number of rows. In this example, each campaign row costs about 64 tokens in indented JSON and about 22 in TOON. A report with 1,200 rows would be around 100 times larger, so a small sample is a good guide to what a full file will cost.
Money is one part of the saving. Every model has a context window, the limit on how much it can read at once. A smaller format leaves room for more rows, clearer instructions or better examples. Models also reply faster when they have less to read.
How to choose a format
The cheapest format is not always the right one. Use the results with these rules of thumb.
- Choose CSV when the model only needs to read the table and the values are mostly text. It has the least extra text of any format.
- Choose TOON when the model has to work with numbers or true and false values. It costs a little more than CSV but keeps those types, which helps the model treat 42 as a number.
- Choose compact JSON when the systems around the model expect JSON. You keep a 42% saving in this example and change nothing else.
- Avoid XML for tables. It was the most expensive format here by a wide margin.
Before you switch a live system to TOON, test it with your own model and task. Current models read it well, as it looks a lot like CSV and YAML, but your prompt and data are what count. Token Intelligence tells you how much you would save, so you can judge whether the test is worth running. We cover the wider case in why TOON will replace JSON at the LLM boundary.
Why teams use Token Intelligence
For marketing and budget owners
It turns a vague worry about AI costs into a number you can act on. You can see in a minute whether the data in a workflow is lean or wasteful, and ask for a change with evidence behind it. Our guide on why marketing teams should care about token efficiency sets out the questions to ask your technical team. This tool answers two of them for a sample.
For analysts and operations teams
You can test your real exports, including Excel files, without sending them anywhere. The data is read and counted on your device, and the page cannot connect to any other server. That makes it safe to try with customer or campaign data that should not leave your organisation.
For developers and agent builders
You get exact OpenAI counts and a lossless check in one place, before you write any conversion code. The round trip check catches problems such as lost trailing zeros or broken values with commas, which are easy to miss by eye. You can then convert the data only at the point it goes to the model and leave your own systems on JSON.
When Token Intelligence is not the right tool
- It works on tables. Nested JSON is flattened into columns, such as address.city, so it does not measure deeply nested data as you would send it. For that kind of data, compact JSON may be the better choice, as the TOON project's own documentation notes.
- It counts tokens, not money. Prices change too often to keep accurate on a static page, so multiply by your provider's current rate.
- It has no exact count for Claude or Gemini, because their tokenisers are not public. The estimate is fine for ranking formats.
- It does not test how well a model understands each format. It tells you the cost, and your own test tells you the quality.
- It measures what you send. The length of the answer is a separate cost, covered in mastering max tokens.
Using it with your own data
Start with the workflow that sends the most data most often. Export a sample of a few hundred rows as CSV, Excel or JSON, up to 5 MB and 50,000 rows. Choose the counter for your model, compare the formats and check the round trip column. If your data has codes that look like numbers, untick the numbers setting and compare again.
If a format saves a large share with nothing lost, test it with your model on a small batch. If the answers hold up, switch that one workflow and move on to the next. For help planning that kind of change across your AI work, see our AI and automation strategy service.
You can run the worked example above in a couple of minutes. Open Token Intelligence, select Use example data and see where your tokens go.



