Convert JSON to TONL with our free online converter.
Use the converter below or open in full converter with more options.
The output below was generated by the same conversion code the converter uses, run on this sample when the page was built.
{
"orders": [
{
"id": 1001,
"status": "shipped",
"total": 59.9,
"customer": {
"name": "Ana Ruiz",
"country": "ES"
},
"items": [
"SKU-104",
"SKU-221"
]
},
{
"id": 1002,
"status": "pending",
"total": 18.5,
"customer": {
"name": "Jonas Berg",
"country": "SE"
},
"items": [
"SKU-310"
]
},
{
"id": 1003,
"status": "shipped",
"total": 112,
"customer": {
"name": "Mei Tanaka",
"country": "JP"
},
"items": [
"SKU-104",
"SKU-415",
"SKU-502"
]
}
]
}#version 1.0
root:
orders[3]:
[0]{customer,id,items,status,total}:
customer{country,name}:
country: ES
name: Ana Ruiz
id: 1001
items[2]: SKU-104,SKU-221
status: shipped
total: 59.9
[1]{customer,id,items,status,total}:
customer{country,name}:
country: SE
name: Jonas Berg
id: 1002
items[1]: SKU-310
status: pending
total: 18.5
[2]{customer,id,items,status,total}:
customer{country,name}:
country: JP
name: Mei Tanaka
id: 1003
items[3]: SKU-104,SKU-415,SKU-502
status: shipped
total: 112TONL output is 8% smaller than the JSON input. The same data is 375 characters as minified JSON and 689 as pretty-printed JSON. Sizes are character counts, not tokens: token counts depend on the model's tokenizer (see the tokenizer comparison).
JavaScript Object Notation is the most widely used data interchange format. Lightweight, easy to parse, and supported by every programming language.
TONL (Token-Optimized Notation Language) is a compact text format that maps one-to-one to JSON and ships with a query API, schema validation, and streaming. Savings are roughly 32-45% versus JSON in the TONL project's own measurements.
Use TONL when you want a compact text format plus tooling around it: querying, schema validation, or streaming. For plain prompt compression, TOON is usually the simpler choice.
Paste your JSON into the editor on json2toon.co. The tool detects the input and produces TONL instantly, then you copy the result. Conversion runs entirely in your browser, so nothing is uploaded to a server.
Yes. Converting JSON to TONL on json2toon.co is free with no account, signup, or usage limit. A free public API is also available for automated, programmatic conversion.
Convert JSON to TONL with our free online converter.
TONL and TOON both compress JSON, but TONL adds a version header, a root wrapper, and field lists on each object. Pick TONL when you plan to use its query or schema features, and TOON when the goal is the smallest prompt.
Yes. The JSON to TONL conversion happens client-side in your browser. Your source data stays on your device and is never sent to or stored on a server, which makes it safe for private or sensitive payloads.