1 MinuteTools

JSON to TOON converter

Turn JSON into TOON and see how many tokens you save.

Your data stays on your device. It is never uploaded.

Paste JSON to see the TOON version here.

  1. 1Paste or open your JSON
  2. 2It is converted in your browser
  3. 3Copy it or download a .toon file

Nothing is uploaded. It all stays on your device.

Convert JSON to TOON

TOON (Token-Oriented Object Notation) is a compact text format for structured data. It keeps the same information as JSON, but writes a list of similar items as a small table, so it often uses fewer tokens when you send data to a language model. Paste your JSON, and this tool shows the TOON version and counts the tokens in both.

Example

The same data, first as JSON, then as TOON:

JSON

{
  "users": [
    {
      "id": 1,
      "name": "Ada",
      "role": "admin"
    },
    {
      "id": 2,
      "name": "Bob",
      "role": "user"
    }
  ]
}

TOON

users[2]{id,name,role}:
  1,Ada,admin
  2,Bob,user

The field names are written once in the header, and each item becomes one short line.

How to use it

  1. Paste your JSON, or open a .json file.
  2. Choose a delimiter and indent if you need something other than the defaults.
  3. Check the TOON output and the token counts.
  4. Copy the TOON, or download it as a .toon file.

When TOON helps

  • Lists of records with the same fields, such as users, products, orders or search results.
  • Data you send to a model again and again, where small savings add up.
  • Data that is less useful when it is very deeply nested or irregular. There, the savings are small or none.

Using TOON in a prompt

Put the TOON in a code block, say that it is TOON, and keep the question separate. For example: "The data below is in TOON format. Each table header lists the field names." Models usually follow this well, but check the answers on your own data.

Format notes

  • This converter follows the TOON specification, version 4.4 (a working draft).
  • Numbers are written in plain decimal form. NaN and Infinity become null.
  • Keys and values with special characters are put in quotes.
  • Whole numbers larger than 9,007,199,254,740,991 lose precision when a browser reads them from JSON.

Your data stays private

Your data is processed in your browser. It is never uploaded or stored.

Questions

What is TOON?
TOON stands for Token-Oriented Object Notation. It is a compact text format for structured data, designed so that the same information costs fewer tokens than JSON when you send it to a language model.
Does TOON always use fewer tokens than JSON?
No. It helps most with long lists of items that share the same fields, such as rows or records. Small or deeply nested data may not gain. This tool counts the tokens for both, so you can see the real difference for your data.
Can language models read TOON?
Many can, especially if you tell the model the data is TOON and include a short example. Results depend on the model, so test it with yours before you rely on it.
Which delimiter should I use?
Commas are the default and work for most data. Tabs or pipes can be better when your values contain many commas, because values that contain the delimiter must be quoted.
Is my data uploaded?
No. The conversion runs in your browser. Your JSON never leaves your device.

More convert

Other free tools