Guide
How to use JSON to TOON
Learn the flow, key features, and API use cases for workflows like n8n, agents, and middleware.
How to use
- Paste JSON or upload a file on the home page.
- Select formatting: indentation, key folding, delimiter, and duplicate handling.
- Click Convert to TOON. Review token savings and copy/download.
- For API usage, call
POST /api/convertwith your payload.
Features
- Live token counts and reduction stats
- Safe JSON validation before convert
- Large file support (browser-side)
- API tokens via dashboard, revoke anytime
- Light/dark theme and downloadable output
- Safe JSON validation before convert
- Large file support (browser-side)
- API tokens via dashboard, revoke anytime
- Light/dark theme and downloadable output
API use cases
- n8n: HTTP Request node → POST /api/convert → feed TOON to LLM nodes
- Zapier/Webhooks: preprocess JSON before model calls
- Agents/RAG: shrink context payloads on the fly
- CI/CD: run conversion in build steps to store TOON alongside JSON
- Zapier/Webhooks: preprocess JSON before model calls
- Agents/RAG: shrink context payloads on the fly
- CI/CD: run conversion in build steps to store TOON alongside JSON
Quick API example
Call the converter from workflows (n8n, Zapier, or custom middleware). For private usage, include your API token in x-api-key.
curl -X POST https://jsontotoon.in/api/convert \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_TOKEN_HERE" \
-d '{"json":{"users":[{"id":1,"name":"Alice"}]},"indentation":"none","keyFolding":"safe","delimiter":","}'Response:
{ "toon": "...", "stats": { ... } }. Use the toon string directly in LLM prompts to cut token usage.