JSON to TOON Converter

Convert JSON to TOON (Token-Oriented Object Notation) and back — cut LLM prompt tokens

TOON (Token-Oriented Object Notation) is a compact encoding of the JSON data model designed for LLM prompts. It keeps objects readable with indentation and turns arrays of similar objects into tables with a single header, so repeated keys, braces and quotes disappear. This converter uses the official TOON reference library to convert JSON to TOON and back, and estimates how many tokens you save.

How to use JSON to TOON Converter

  1. Paste JSON. Paste JSON or open a .json file in the input panel.
  2. Pick options. Choose a delimiter and indentation for the TOON output.
  3. Check the saving. Compare the estimated tokens for TOON and JSON above the editors.
  4. Copy or reverse. Copy or download the TOON, or switch to TOON → JSON to decode it.

Features

  • Comma, tab or pipe delimiters and 2 or 4 space indentation.
  • Live token and character comparison against formatted and minified JSON.
  • Strict TOON validation with line numbers, file open and .toon/.json download.

Why use this tool

  • Cut prompt costs: tabular data often needs 30–60% fewer tokens than formatted JSON.
  • Lossless round trip: decode TOON back to identical JSON at any time.
  • Private: conversion happens in your browser, nothing is sent to a model or server.

Frequently asked questions

What is TOON format?

TOON (Token-Oriented Object Notation) is a compact, human-readable way to write JSON data for large language models. It uses indentation like YAML for nesting and a table-like layout for arrays of objects, declaring the field names once instead of repeating them in every row.

How do I convert JSON to TOON?

Paste JSON into the left panel or open a .json file and the TOON version appears on the right as you type. Choose a comma, tab or pipe delimiter and 2 or 4 space indentation, then copy the result or download it as a .toon file.

How much does TOON reduce LLM token usage?

It depends on the shape of your data. Arrays of objects with the same fields save the most, often 30 to 60 percent against formatted JSON, because keys are written once as a header. Deeply nested or irregular data saves less. The tool shows an estimated saving for your exact input.

Can I convert TOON back to JSON?

Yes. Switch to TOON to JSON, paste TOON text and get pretty or minified JSON. Strict mode checks that each array has the number of items its [N] header declares, which catches truncated or hand-edited data. The conversion is lossless for any valid JSON.

Which delimiter should I use for TOON?

Comma is the default and the most readable. Tab often tokenises more efficiently and avoids quoting values that contain commas, such as addresses. Pipe is a good middle ground when your text has both commas and tabs. Values that contain the active delimiter are quoted automatically.

Is my JSON sent to a server or an AI model?

No. The conversion runs entirely in your browser using the TOON reference library, so your data never leaves your device. Token counts are estimated locally too, which is why they are approximate rather than exact for a specific model.

Is my data shared when using the JSON to TOON Converter?

No. Toolskyt operates under a zero-server policy. All calculations, data formatting, and file exports are executed locally on your machine.

Do I need to sign up or pay to use the JSON to TOON Converter?

No, this tool is 100% free. There are no limits, sign-ups, subscriptions, or hidden charges required.

Is it safe to paste API tokens or private JSON data here?

Yes, absolutely. The tool executes 100% inside your local browser memory space. No inputs are sent to any servers.

Related tools

  • JSON Formatter & Validator — Format, validate, and beautify JSON with syntax highlighting
  • JSON Compare — Compare two JSON documents — ignores key order, lists every changed path, merge side by side
  • JSON ⇄ CSV Converter — Convert JSON arrays to CSV and CSV back to JSON, with nested-key flattening