Loading TOON Minifier...
Please wait a moment

How to Use TOON Minifier - Step by Step Guide

Step 1

Input Your TOON Data

Paste your TOON formatted data into the input editor, upload a .toon file, or click "Sample" to see an example. You can convert from JSON, CSV, or YAML if needed.

subscribers[3]{id, name, phone, plan}:
  1, Sarah Mitchell, +1-555-0101, Unlimited 5G
  2, Michael Chen, +1-555-0102, Premium LTE
  3, Jennifer Kumar, +1-555-0103, Business Pro

metadata:
  version: "2.0"
  status: "active"
Step 2

View Compression Statistics

The tool automatically shows you:

  • Size Reduction: Percentage of bytes saved
  • Token Savings: Estimated tokens saved (crucial for LLM costs)
  • Compression Ratio: How much smaller the minified version is
  • Absolute Savings: Exact bytes saved
Step 3

Use Minified TOON

Copy the minified TOON or download it as a file. Use it in your LLM applications or convert it to other formats like JSON, CSV, or Table. The minified version is:

subscribers[3]{id,name,phone,plan}:
  1,Sarah Mitchell,+1-555-0101,Unlimited 5G
  2,Michael Chen,+1-555-0102,Premium LTE
  3,Jennifer Kumar,+1-555-0103,Business Pro
metadata:
  version:"2.0"
  status:"active"

The spaces after commas and colons and the blank line are gone. The two-space indent on the rows and under metadata stays, because that is how a TOON reader knows which lines belong together.

Frequently Asked Questions

What is TOON minification?

It strips the whitespace a TOON reader ignores: blank lines, trailing spaces, the space after each key's colon and the spaces around commas (or tabs and pipes) in table rows and inline lists. The two-space indent stays, because TOON reads its structure from it. Fewer characters means fewer tokens in your LLM prompts. You can also use our TOON Validator to check syntax before minifying.

How much can I save with TOON minification?

Less than people expect, because TOON is already compact. Output straight from an encoder usually shrinks by only a few percent, mostly from the space after each colon. Hand-edited files with spaces after commas, blank lines and trailing spaces save more, typically 5-10%. The badge and the line under it show the exact byte count for your input, measured on the real output.

Does minification change my data?

No. Text inside quotes and inside plain values is never touched, so "Hello, world" or 10: 30 stay exactly as written, and numbers like 8901240544102066246 or 14.50 keep every digit. Before showing the result, the tool decodes both the original and the minified TOON and checks they give the same data. If they would not, it only removes blank lines and trailing spaces.

Why is token count important?

LLM providers like OpenAI andAnthropic Claude charge based on tokens. Reducing token count directly reduces your API costs. Additionally, models have context length limits measured in tokens.

Can I minify large TOON files?

Yes! The minifier handles TOON files of any size efficiently. For very large files, you'll see even more significant savings in absolute bytes and tokens. You can also use our TOON Viewer to visualize the minified data or TOON Formatter to beautify it again.

Is this tool free?

Yes, completely free with no limits! Minify as many TOON files as you need, with real-time statistics and instant results.