TOON Formatter & Validator

Free Validate · Re-encode with chosen delimiter & indent · Syntax highlighted
Indent
Delimiter
TOON INPUT
OUTPUT
// TOON output
Lines: Est. tokens:

その他の開発ツール

TOON→JSON
JSON に変換
JSON→TOON
LLM 向け
JSON フォーマッター
整形・検証・圧縮
Base64
エンコード
URL エンコード
パーセント変換
正規表現
リアルタイムテスト
YAML フォーマッター
整形・検証
JSON→YAML
YAML に変換

About TOON Formatter & Validator

Validate & Re-encode TOON

Parses your TOON via a full round-trip through the data model, then re-serialises it cleanly. Catches structural errors, malformed tabular arrays, and invalid scalar values.

Delimiter & Indent Control

Choose comma or pipe as the tabular delimiter and set 2 or 4-space indentation for nested objects. Useful for re-encoding TOON to match a specific LLM prompt style or downstream parser.

Tabular Array Optimisation

Uniform arrays of objects are automatically collapsed into the compact tabular header-plus-rows format, maximising token savings when sending data to an LLM.

プライバシー最優先

All formatting runs in your browser — no data is sent to any server. Safe for TOON payloads containing business data, PII, or proprietary schemas.

よくある質問

What is TOON?

TOON (Token-Oriented Object Notation) is a compact, lossless encoding of the JSON data model designed to reduce token count when sending structured data to large language models. It uses YAML-style indentation for objects and a CSV-style tabular layout for uniform arrays, achieving up to 60% fewer tokens than equivalent JSON.

Why format TOON before sending to an LLM?

Consistent formatting helps LLMs parse structure reliably. The formatter ensures tabular arrays are properly collapsed, indentation is uniform, and all scalar values are correctly quoted — reducing the chance of the model misreading the structure.

What is the tabular array format?

When all objects in an array share the same primitive-valued fields, TOON writes a header key[N]{f1,f2,f3}: followed by one comma-separated data row per object. This is the biggest source of token savings compared to JSON.

Is formatting TOON lossless?

Yes. The formatter works by parsing TOON into the full JSON data model and then re-encoding it. All values, types, and structure are preserved. The only changes are whitespace normalisation and delimiter/indent adjustments you explicitly choose.

詳細ガイド
JSON 完全ガイド
フォーマット・検証・変換・ベストプラクティス
ガイドを読む