DEV Community

Cover image for TOON vs JSON: A Modern Data Format Showdown

TOON vs JSON: A Modern Data Format Showdown

Seenivasa Ramadurai on November 08, 2025

Introduction The evolution of data formats tells a fascinating story about how technology adapts to meet our changing needs. From the hu...
Collapse
 
alifar profile image
Ali Farhat

Thank you for the article, would you mind adding our JSON to TOON tool in your article?
scalevise.com/json-toon-converter

Collapse
 
sreeni5018 profile image
Seenivasa Ramadurai

Hi Ali ,
Sure , will do .

Thanks
Sreeni

Collapse
 
sreeni5018 profile image
Seenivasa Ramadurai

Hi Ali ,
I have added your TOON tool in my blog .
Thanks
Sreeni

Collapse
 
alifar profile image
Ali Farhat

Thanks a million 🙏🏼🙌

Thread Thread
 
sreeni5018 profile image
Seenivasa Ramadurai

You are welcome.

Collapse
 
elanatframework profile image
Elanat Framework

In my opinion, INI is more powerful than JSON:

[core]
key = app
config = {"id":"coolapp","mode":"prod","lang":"en","threads":4}

[auth]
key = security
settings = {"oauth2":true,"token_ttl":3600,"jwt":"${ENV:JWT_SECRET}"}

[modules]
key = features
state = {"active":["analytics","cache"],"inactive":["debug"]}

[cache]
key = redis
connection = {"host":"127.0.0.1","port":6379,"ttl":300}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
sreeni5018 profile image
Seenivasa Ramadurai

Well, it’s kind of a yes and no. The .INI file format is definitely more familiar to Windows users, and it’s simple enough for basic configuration needs.

But that simplicity can be a double-edged sword .INI files can get messy and error-prone, especially when you try to handle complex or nested settings. That’s why most developers eventually moved on to XML, JSON, and YAML formats that are more structured, flexible, and platform-independent.

That said, if .INI fits your use case, go for it. But when it comes to AI or agentic applications, where efficiency and cost really matter, TOON is the smarter choice it’s lightweight and cost-effective.

Thanks,
Sreeni

Collapse
 
btullbmc profile image
btullBMC

It loosk like a CSV.
Why not just use a CSV?

Collapse
 
sreeni5018 profile image
Seenivasa Ramadurai

Hi There ,
The idea is to reduce the tokens ... so if we use CSV format then comma counted as the token too. And for LLM we can pass any suitable format with optimized tokens .

Thanks
Sreeni

Collapse
 
xwero profile image
david duymelinck

TOON has commas too, the only difference with tabular data is that TOON's header line has more characters.

TOON: users[3]{id,name,role,email}:
CSV: id,name,role,email

What happens when the data has a comma in it does it keep the quotes to prevent the data comma to be seen as a new column?

Collapse
 
richardevcom profile image
richardevcom

I'll just leave this here for people still taking this seriously 👀

Collapse
 
sreeni5018 profile image
Seenivasa Ramadurai

SLOP Sreeni Learned Only Post .. hope this SLOP makes sense for you

Collapse
 
kelvynthai profile image
Kelvyn Thai

dev -> json, dev-ops -> yaml, TOON -> let LLM's guys debate =))

Collapse
 
sreeni5018 profile image
Seenivasa Ramadurai

The point is simple: JSON → TOON transformations exist because transformers (LLMs) need them.
Every application or technology requires its own perspective on the data.

 
sreeni5018 profile image
Seenivasa Ramadurai

SLOP Share the Link Of that Post .. hope this slop makes more sense

Collapse
 
nguyenh profile image
Nguyen

It's look like another CSV inherit for me

Collapse
 
sreeni5018 profile image
Seenivasa Ramadurai

Exactly, you’re right. The main goal is to reduce the token count while preserving the essential, structured, and meaningful information

Collapse
 
krishna_vijayaram_12e0678 profile image
Krishna Vijayaram

Drastically reduces the tokens and file size.

Collapse
 
sreeni5018 profile image
Seenivasa Ramadurai

Well , TOON Definitely reduces the tokens ... what you mean file size ... in AI Application we just pass the context to LLM to inference ... i do not think we save this in file .. however your statement is valid

Collapse
 
hatixntsoa profile image
Hatix Ntsoa

toontools.vercel.app

The official converter with all the known formats

Collapse
 
sreeni5018 profile image
Seenivasa Ramadurai

i am not following , what you mean all formats ?. we need final target as TOON

Collapse
 
hatixntsoa profile image
Comment deleted
Thread Thread
 
sreeni5018 profile image
Seenivasa Ramadurai • Edited

Nice point. However, since LLMs operate on tokens, our goal should be to target TOON it helps reduce the number of tokens (and therefore the data size). Moreover, since most APIs and MCP servers already use JSON, a single conversion to TOON should be sufficient in my opinion.

Thread Thread
 
hatixntsoa profile image
Hatix Ntsoa

Yes and I hope they'll implement it soon

Collapse
 
bartek_ceed9ec625d8ec89c3 profile image
Bartek

Honestly, TOON only really stands out when you’re converting JSON — with YAML or CSV, the difference is barely noticeable. That said, it’s fun to experiment with, and I actually made a little tool that converts JSON, YAML, or CSV into TOON json2toon.co/

Collapse
 
mindplay profile image
Rasmus Schultz

wow yes we need a whole new format for this

oh wait

Collapse
 
sreeni5018 profile image
Seenivasa Ramadurai

The one you posted is JSON right .. we need TOON without all { and , and other chars :)

Collapse
 
malec profile image
Mário Malček

I've just added support for TOON encoding to my converter utility. mmalcek.github.io/bafi/ as easy as ./bafi -i input.json -t "?{{ toTOON . }}" :)

Collapse
 
manikantareddypasala profile image
Manikanta Reddy Pasala

protobuf makes more sense right ?

Collapse
 
sreeni5018 profile image
Seenivasa Ramadurai

Well protobuf is gRPC service definition format.. that is nothing to do with LLMS context format..