xcb tools

JSON to TOON converter

JSON to TOON Converter

Everything above runs locally in your browser — your data is never uploaded anywhere.

What is TOON?

TOON (Token-Oriented Object Notation) is a compact text format for the same data JSON represents, designed to use fewer tokens when you paste structured data into an LLM prompt. It combines YAML-style indentation for nested objects with a CSV-style tabular layout for arrays of similar objects.

TOON saves the most tokens on uniform arrays of objects — the same fields, repeated across many items, like rows in a table. On deeply nested or irregular JSON, the savings are much smaller, and can occasionally be negative. Convert your actual data above and check the numbers instead of assuming.

FAQ

Is TOON always smaller than JSON?

No. TOON is optimized for uniform arrays of objects. For deeply nested or irregular data, the difference can be small or even reversed. This tool shows the real token counts for your specific data instead of a general estimate.

Can I convert TOON back to JSON?

Yes — use the swap button to switch direction. The converter is fully bidirectional and the round trip is lossless.

Does this tool upload my data anywhere?

No. The conversion and token counting both run locally in your browser using JavaScript. Nothing you paste here is sent to a server.