Transform your XML data into the clean, token-efficient TOON format.
This tool parses your XML into a nested structure and re-encodes it as TOON (Token-Oriented Object Notation), a compact format that strips the angle brackets and repeated tag names XML spends so many tokens on. Elements, attributes and nesting are preserved in the conversion.
Each result is measured with the cl100k_base tokenizer used by GPT models, so you can see exactly how many tokens the TOON version saves over the original XML.
Helpful when the data you need a model to read arrives as XML - SOAP responses, RSS feeds, exported documents - and the repeated tags would otherwise eat your token budget. Convert to TOON to shrink it before it goes into the prompt.
Stripping the closing tags alone removes a large share of the tokens XML spends on structure, which is why tag-heavy documents tend to show the biggest saving.
TOON (Token-Oriented Object Notation) is a minimal, indentation-based data format for LLM prompts. It keeps data readable while using fewer tokens than XML or JSON.
The XML is parsed into a nested structure that keeps elements and attributes, and that structure is written out as TOON, so attribute data is carried over.
The tool counts tokens with the cl100k_base encoder used by GPT-3.5 and GPT-4, then compares the XML and TOON counts to show the percentage saved.
Yes. The conversion runs on our server, so your XML is sent there to be processed and is not stored. Avoid pasting anything sensitive you would rather keep local.