The JSON to TOON Converter node enables seamless bidirectional conversion between JSON and TOON formats in your n8n workflows.

TOON (Text Object Oriented Notation) is a human-readable data format that provides an alternative to JSON with enhanced readability and flexibility for configuration files, data export, and human-friendly data representation.
Read more about TOON.
Using JSON to TOON and TOON to JSON nodes can reduce AI tokenization by 40% to 60% when working with language models.
By passing TOON instead of JSON to AI prompts, you can:
Example comparison:
JSON (125 characters):
{"user":"John","role":"admin","permissions":["read","write","delete"],"active":true}
TOON (85 characters):
user: John
role: admin
permissions: [read, write, delete]
active: true
This workflow pattern is especially valuable when sending large datasets to AI models or when making frequent API calls where token optimization directly impacts your costs.
The JSON to TOON Converter node supports two operations:
Convert JSON data into TOON format for improved readability.
Input:
{
"name": "John Doe",
"age": 30,
"email": "john@example.com",
"address": {
"street": "123 Main St",
"city": "New York",
"zipCode": "10001"
},
"hobbies": ["reading", "coding", "hiking"]
}
Output:
name: John Doe
age: 30
email: john@example.com
address:
street: 123 Main St
city: New York
zipCode: 10001
hobbies:
- reading
- coding
- hiking
Parse TOON format back into JSON for processing and API integration.
Input:
product: Laptop
brand: TechCorp
price: 1299.99
specifications:
processor: Intel i7
ram: 16GB
storage: 512GB SSD
display: 15.6 inch
inStock: true
Output:
{
"product": "Laptop",
"brand": "TechCorp",
"price": 1299.99,
"specifications": {
"processor": "Intel i7",
"ram": "16GB",
"storage": "512GB SSD",
"display": "15.6 inch"
},
"inStock": true
}
| Parameter | Description | Required |
|---|---|---|
| Operation | Choose between "JSON to TOON" or "TOON to JSON" | Yes |
| Input Data | The data to convert (JSON object or TOON string) | Yes |
| API Key | Your CustomJS API key for authentication | Yes |
To use the JSON to TOON Converter node, you need a CustomJS API key:
For detailed instructions, see API Key Documentation.