Coding Tools

JSON to TOON Converter

Use this free JSON to TOON Converter to turn JSON into Token-Oriented Object Notation, a compact format designed to reduce token usage when passing structured data to language models. Paste your JSON, get TOON, and read below to check whether your data is the shape TOON actually helps with. No sign-up required.

Instant Conversion Token Savings 100% Free
0
JSON Tokens
0
TOON Tokens
0
Tokens Saved
0%
Reduction

Why You Are Here

You are paying for tokens and want to pay less. Sending structured data to a language model costs money per token, and JSON is verbose by design.

You are hitting context window limits. More rows in the same window means better coverage on retrieval and analysis tasks.

You have read the claims and want to check them against your own data. Reasonable, and the sections below explain what the published figures actually measure.

What This Tool Does

The JSON to TOON Converter takes JSON and outputs the equivalent in Token-Oriented Object Notation.

Paste JSON and the tool returns TOON representing the same data. The conversion is lossless in both directions for the JSON data model.

TOON borrows from two formats. It uses YAML-style indentation for nested objects and CSV-style rows for uniform arrays, which is where the token savings come from.

What TOON Is

Token-Oriented Object Notation was created by Johann Schopplich and released in October 2025. It is a compact encoding of the JSON data model, designed specifically for putting structured data into language model prompts.

The core idea is removing repetition. In a JSON array of objects, every field name is repeated in every object. TOON declares the field names once and then lists the values as rows.

JSON:

[

  {"id": 1, "name": "Ana",  "role": "admin"},

  {"id": 2, "name": "Ben",  "role": "editor"},

  {"id": 3, "name": "Cara", "role": "viewer"}

]

TOON:

[3]{id,name,role}:

  1,Ana,admin

  2,Ben,editor

  3,Cara,viewer

Three field names appear once instead of nine times

Across a hundred rows, that difference compounds substantially.

The array length declaration is deliberate

TOON declares the array length and field list explicitly, which costs a few tokens and appears to improve model accuracy. The format's author attributes better comprehension to exactly this.

The Honest Version of the Token Savings

The figure quoted everywhere is 30 to 60 percent. That is a real range, and it is a best case rather than a typical one. What the comparison is against matters enormously.

Compared against

Approximate saving

Pretty-printed JSON

~40%

Compact JSON, no whitespace

~25%

YAML

~38%

If you are already sending minified JSON, your realistic saving is nearer a quarter than a half

Most published headline figures compare against pretty-printed JSON, which is the most verbose baseline available.

TOON also adds around 5% overhead

In field headers and array length declarations. That cost is deliberate, buying accuracy, but it is real and it eats into the saving on smaller payloads.

The saving scales with uniformity, not size

A thousand records with identical fields save enormously. A thousand records with different fields each save nothing, for reasons covered in When TOON Loses.

When TOON Loses

This is the part no other page covers, and it is the most useful thing here. TOON's saving comes entirely from declaring field names once. Where that is not possible, the mechanism does not apply and the overhead remains.

Your data

Best format

Why

Uniform arrays of objects

TOON

Field names declared once, rows beneath

Deeply nested structures

YAML or JSON

TOON has no advantage and adds overhead

Non-uniform objects

JSON

No shared field list to factor out

A single flat table

CSV

More compact still, if you need no structure

Mixed shapes in one array

JSON

TOON falls back and gains nothing

A February 2026 benchmark paper is blunt about the worst case

Stating that for deep hierarchies, complex state trees, DOM-like structures, and deeply nested configuration, TOON is not production-ready and conventional serialization should be used instead.

So the question is not should I use TOON but is my data tabular

Log rows, database records, product listings, and API result sets typically are. Configuration files, document trees, and nested application state typically are not.

Accuracy Went Up, Not Down

A result worth stating because the intuition runs the other way. Compression usually costs comprehension. With TOON it appears not to.

In a benchmark across four major models

TOON used 39.6% fewer tokens than JSON while scoring 73.9% accuracy against JSON's 69.7%. The format's author reports 99.4% accuracy on one model at 46% fewer tokens, across roughly 160 questions with semantic validation.

The proposed explanation is the explicit structure

Declaring the row count and field list up front gives the model a schema to check itself against, which appears to reduce errors rather than introduce them.

Treat these as encouraging rather than settled

They come from a young format with a small body of independent testing, and results vary by data shape and model.

TOON Works Better as Input Than Output

A subtlety with real practical consequences, and one almost nobody mentions.

TOON was released in late 2025, so it does not appear in the training data of models trained before then

Models can read it, since the syntax is simple enough to follow from context, but they have not learned to produce it.

Direction

Practicality

Sending TOON to a model

Works well, this is TOON's strength

Asking a model to reply in TOON

Requires a one-shot example in the prompt

That example is prompt overhead

On a small response, the tokens spent teaching the format can exceed the tokens saved by using it. The benchmark paper testing generation found TOON viable in high-volume, in-domain pipelines where the schema is stable and the example cost amortises across many calls, and not otherwise.

The practical position

Convert your input data to TOON, and let the model reply in JSON, which it generates natively and which your parser already handles.

Measuring Your Actual Saving

Count tokens, not characters

Character count is not a reliable proxy, because tokenizers split text unevenly and formatting characters do not cost uniformly.

Use your target model's tokenizer

tiktoken for OpenAI models, Anthropic's tokenizer for Claude. Savings differ between tokenizers on the same input.

Test with your real payloads

Published benchmarks use their own datasets, and your data shape determines your result more than any published figure does.

A sensible evaluation

  1. Take a representative payload from your actual pipeline.
  2. Count tokens as compact JSON, not pretty-printed, if that is what you currently send.
  3. Convert to TOON and count again.
  4. Run the same task both ways and compare output quality, not just token count.
  5. Decide on the numbers you measured, not the ones in an article.

A Note on Maturity

Worth being straightforward about, because this format is less than a year old.

TOON is not a formally standardised specification

There is no RFC and no standards body. The specification lives in a project repository and implementations vary between practitioners.

Tooling is thin compared with JSON

A TypeScript SDK and a Python port exist alongside community implementations, but nothing like JSON's ecosystem.

Keep a JSON fallback

If TOON parsing fails or an implementation disagrees with another, a fallback path prevents silent data loss.

JSON remains the correct default for most work

TOON is a specialised tool for a specific problem: token overhead in high-volume pipelines where you control both the prompt and the parser. It is not a JSON replacement, and the community around it has been notably clear-eyed about that.

Common Mistakes to Avoid

Expecting 60% Savings on Any Data

The published range is a best case measured on uniform tabular arrays against pretty-printed JSON. If your data is deeply nested, non-uniform, or you already send compact JSON, your saving will be far smaller and may be negative once TOON's roughly 5% header overhead is counted. Measure your own payloads with your model's tokenizer before committing to a conversion.
Asking a Model to Respond in TOON

TOON post-dates the training data of most models, so while they read it comfortably, generating it reliably requires a one-shot example in the prompt. That example costs tokens, frequently more than the reply saves. Send TOON as input and accept JSON as output, which models produce natively and existing parsers already handle.
Using TOON for Configuration or Nested State

TOON's entire advantage comes from factoring out repeated field names in uniform arrays. Deeply nested structures have no repeated field list to remove, so TOON adds overhead without the benefit, and published benchmark work explicitly recommends against it for deep hierarchies. YAML or JSON is the better choice for anything tree-shaped.

Quick Reference

Item

Detail

TOON

Token-Oriented Object Notation

Released

October 2025

Structure

YAML indentation plus CSV rows

Mechanism

Field names declared once, not per record

vs pretty-printed JSON

~40% saving

vs compact JSON

~25% saving

Overhead

Adds ~5% in headers

Wins on

Uniform tabular arrays

Loses on

Deeply nested data

Single flat table

CSV is smaller

Accuracy

Went up in benchmarks, not down

Best used as

Input, not model output

Standard

Not formal, keep a JSON fallback

Measuring

Use a tokenizer, not character count

Frequently Asked Questions

What is a JSON to TOON converter?

A JSON to TOON converter transforms JSON into Token-Oriented Object Notation, a compact format designed for passing structured data to language models with fewer tokens. This JSON to TOON Converter performs the conversion instantly and losslessly for the JSON data model.

What is TOON?

Token-Oriented Object Notation is a serialisation format created by Johann Schopplich and released in October 2025. It encodes the JSON data model more compactly by combining YAML-style indentation for nested objects with CSV-style rows for uniform arrays, declaring field names once instead of repeating them in every record.

How much will TOON actually save me?

It depends heavily on your data shape and your baseline. Against pretty-printed JSON the saving is around 40%, but against compact JSON it is closer to 25%, and TOON adds roughly 5% overhead in headers. Uniform tabular arrays save the most; non-uniform or deeply nested data may save nothing at all.

When should I not use TOON?

When your data is deeply nested, when objects in an array have different fields, or when you need a single flat table where CSV would be more compact. Benchmark work explicitly advises against TOON for deep hierarchies, state trees, and nested configuration, where conventional formats remain the better choice.

Does TOON reduce accuracy?

Published benchmarks suggest the opposite. Across four major models TOON used 39.6% fewer tokens while scoring 73.9% accuracy against JSON's 69.7%, with the explicit row count and field list credited for the improvement. These are encouraging early results from a young format rather than a settled conclusion.

Can I ask a model to reply in TOON?

You can, but it usually costs more than it saves. TOON was released after most models were trained, so producing it reliably needs a one-shot example in the prompt, and that overhead frequently exceeds the tokens saved on the reply. Sending TOON as input and receiving JSON as output is the more practical arrangement.

How do I measure my own token savings?

Use your target model's tokenizer rather than counting characters, since tokenizers split text unevenly. Take a representative payload, count it as compact JSON, convert it, and count again. Then run the same task in both formats and compare output quality alongside token count, since a saving that degrades results is not a saving.

Is TOON a replacement for JSON?

No, and its own community is clear about that. TOON is a specialised format for reducing token overhead in high-volume pipelines where you control both prompt and parser. JSON remains the right default for interoperability, tooling, and anything consumed by systems other than a language model. Use this JSON to TOON Converter where the data is tabular and the saving is measurable.

Comments

Login to leave a comment

No comments yet. Be the first to comment!