YAML to TOON Converter

Transform your YAML data into the clean, token-efficient TOON format.

What is the YAML to TOON converter?

TOON (Token-Oriented Object Notation) is a compact, indentation-based format that strips the punctuation a model does not need, so structured data costs fewer tokens in a prompt. This tool parses your YAML and re-encodes it as TOON, keeping the same keys, values and nesting.

It also measures the result with the cl100k_base tokenizer used by GPT models and shows how many tokens you saved - typically 30-50% versus the original.

How to use the YAML to TOON converter

  • 1. Paste your YAML into the Input YAML field.
  • 2. Choose a delimiter (comma, pipe or tab) and an indentation style.
  • 3. Optionally enable length markers to annotate each line.
  • 4. It converts automatically; copy the TOON Output with the Copy button.

Features

  • Parses standard YAML, including nested maps and lists.
  • Compact TOON output with your choice of delimiter and indentation.
  • Live token count and savings from a GPT-style tokenizer.
  • Optional per-line length markers.
  • Free to use, no account.

When to use it

Handy when your source of truth is YAML - CI configs, Kubernetes manifests, app settings - and you want to feed it to a model without burning tokens on syntax. Convert the YAML to TOON, drop it into your prompt, and keep more room for the actual question.

It is a quick win before any prompt that carries configuration as context, and the live stats let you confirm the saving was worth it for that specific file.

FAQ

What is TOON format?

TOON (Token-Oriented Object Notation) is a minimal, indentation-based data format for LLM prompts. It keeps your data readable while using fewer tokens than JSON or YAML.

Does it support nested YAML?

Yes. Nested maps, lists and scalars are parsed and carried over into the TOON output with the same structure.

How are token savings measured?

The tool counts tokens with the cl100k_base encoder used by GPT-3.5 and GPT-4, then compares the YAML and TOON token counts to show the percentage saved.

Is my data uploaded?

Yes. The conversion runs on our server, so your YAML is sent there to be processed and is not stored. Do not paste secrets you would rather keep local.

Related tools