CSV to TONL Converter

Input CSV

Output TONL

Your TONL appears here as you type.

Paste data to see token savings

Convert CSV to TONL with our free online converter.

Example: CSV 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.

CSV input (135 characters)
sku,name,price,stock
SKU-104,USB-C cable,9.99,240
SKU-221,Laptop stand,34.5,58
SKU-310,Webcam cover,3.25,1200
SKU-415,Desk mat,19,0
TONL output (162 characters)
#version 1.0
root[4]{name,price,sku,stock}:
  USB-C cable,9.99,SKU-104,240
  Laptop stand,34.5,SKU-221,58
  Webcam cover,3.25,SKU-310,1200
  Desk mat,19,SKU-415,0

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

CSV to TONL: what changes

  • CSV rows become one TONL table, but columns are reordered alphabetically and numeric cells stay quoted strings because CSV carries no types.
  • Reading CSV: CSV has no types: every cell is read as a string, so 9.99 becomes "9.99" in the output (visible in the sample below). The first row must be the header, and nested data cannot be represented.
  • 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 CSV

Comma-Separated Values is the standard format for tabular data. Perfect for spreadsheets, data analysis, and simple data exports.

  • ✓Spreadsheet compatible
  • ✓Simple
  • ✓Universal
  • ✓Great for data analysis
Full CSV 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 CSV 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.

CSV to TONL: Frequently Asked Questions

How do I convert CSV to TONL?

Paste your CSV 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 CSV to TONL converter free?

Yes. Converting CSV 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 CSV to TONL?

Convert CSV to TONL with our free online converter.

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

CSV rows become one TONL table, but columns are reordered alphabetically and numeric cells stay quoted strings because CSV carries no types.

Is my data safe when I convert CSV to TONL?

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