TOML to TONL Converter

Input TOML

Output TONL

Your TONL appears here as you type.

Paste data to see token savings

Convert TOML to TONL with our free online converter.

Example: TOML input and real TONL output

The output below was generated by the same conversion code the converter uses, run on this sample when the page was built.

TOML input (155 characters)
[package]
name = "invoice-tool"
version = "0.3.2"
edition = "2021"

[dependencies]
serde = "1.0"
tokio = "1.40"

[profile.release]
lto = true
opt-level = 3
TONL output (281 characters)
#version 1.0
root{dependencies,package,profile}:
  dependencies{serde,tokio}:
    serde: "1.0"
    tokio: "1.40"
  package{edition,name,version}:
    edition: "2021"
    name: invoice-tool
    version: 0.3.2
  profile:
    release{lto,opt-level}:
      lto: true
      opt-level: 3

TONL output is 81% larger than the TOML input. The same data is 165 characters as minified JSON and 244 as pretty-printed JSON. Sizes are character counts, not tokens: token counts depend on the model's tokenizer (see the tokenizer comparison).

TOML to TONL: what changes

  • Reading TOML: A TOML document always parses to a table (an object), never a bare array. Datetimes are a TOML-native type and come out as ISO 8601 strings.
  • Writing TONL: TONL output starts with #version 1.0 and a root key, lists field names in braces, and sorts keys alphabetically. On small payloads the header and per-object field lists make it larger than TOON; TONL earns its place through its query, schema, and streaming tooling.

About TOML

TOML is a config file format with explicit types. It's the official format for Python's pyproject.toml and Cargo's Cargo.toml.

  • ✓Explicit types
  • ✓Standard in Python/Rust
  • ✓Unambiguous
  • ✓Easy to parse
Full TOML Documentation →

About TONL

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.

  • ✓Lossless round trip to JSON
  • ✓Query and aggregation API
  • ✓Schema validation (TSL)
  • ✓Streaming for large files
Full TONL Documentation →

Why Convert TOML to TONL?

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.

TOML to TONL: Frequently Asked Questions

How do I convert TOML to TONL?

Paste your TOML 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.

Is the TOML to TONL converter free?

Yes. Converting TOML 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.

Why convert TOML to TONL?

Convert TOML to TONL with our free online converter.

What should I watch out for when converting TOML to TONL?

TONL output starts with #version 1.0 and a root key, lists field names in braces, and sorts keys alphabetically. On small payloads the header and per-object field lists make it larger than TOON; TONL earns its place through its query, schema, and streaming tooling.

Is my data safe when I convert TOML to TONL?

Yes. The TOML 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.