TOON to XML Converter
Convert TOON to XML format with validation
TOON Input
XML Output
Paste your TOON on the left and the XML shows up here.
Or drop a file on this box, , or .
What is TOON to XML Converter?
TOON (Token-Oriented Object Notation) is built to save tokens when you feed structured data to a language model: one header line names the fields, then each row is just the values. That is great for prompts and useless for a system that wants a SOAP body or an XML config. Paste TOON on the left and this page writes the same records out as XML on the right, one element per field.
The interesting part is the tabular block. A header such as users[3]{id,name,role}: followed by three comma-separated rows turns into three <users> elements, each with <id>, <name> and <role> children. Nested TOON objects become nested elements, a primitive array like tags[2|]: soil|humid becomes two <tags> elements, and the whole result is wrapped in one <root>.
Decoding and building the XML happen in the page itself, so the data stays on your machine. If the decode fails and you cannot see why, the TOON Validator points at the line, and TOON to JSON shows the decoded structure in a form that is easier to read.
What Makes This Tool Different
Well-Formed XML
Generates valid, well-formed XML that follows XML standards. Proper nesting, closing tags, and structure ensure compatibility with any XML parser or tool.
Proper Escaping
Ampersands and angle brackets in your values are escaped as XML entities, so text like Tom & Jerry
Pretty Formatting
The XML output is beautifully formatted with proper indentation (2 spaces) and line breaks. Easy to read, easy to debug, ready to use.
File Upload Support
Got a TOON file? Hit Upload and pick a .toon or .txt file instead of copy-pasting.
Download XML
One click to download your converted XML as a .xml file. Perfect for saving, sharing, or importing into XML-compatible systems.
Handles All Types
Supports arrays, objects, nested structures, primitives, and mixed data types. Converts everything from simple values to complex hierarchical data.
How It Works
Paste or Upload TOON
Drop TOON text on the left, or load a .toon file with Upload. Sample loads a three-row users table (Ava Chen, Marcus Okafor, Priya Raman) so you can see a tabular array turn into repeated elements. Clear wipes both sides.
Automatic Conversion
Stop typing for a moment (the page waits 300 ms) and the XML shows up on the right. If a header promises three rows and only two follow, you get "Invalid TOON: Expected 3 tabular rows, but got 2" instead of a silently shortened document.
Copy or Download
"Copy" sends the XML to the clipboard, and "Download" writes it out as a .xml file. The output is indented and well-formed, so anything that reads XML can take it directly.
When You'd Actually Use This
SOAP APIs
Working with SOAP web services that require XML? Convert your TOON data to XML format for seamless integration with SOAP APIs and XML-based web services.
Configuration Files
Many applications use XML for configuration files. Convert TOON data to XML for use in XML-based config systems, build tools, or deployment configurations.
Data Exchange
Exchanging data with systems that only accept XML? Convert TOON to XML for universal compatibility. XML is widely supported across different platforms and languages.
Legacy Systems
Integrating with legacy systems that require XML format? Convert TOON data to XML for compatibility with older systems, databases, or enterprise applications.
Common Questions
Is my TOON data stored?
No. The page decodes TOON with the @toon-format/toon package and builds the XML with a few lines of JavaScript, both inside this tab. There is no conversion request to a server, so nothing is stored.
What TOON formats are supported?
Anything the @toon-format/toon decoder accepts in strict mode: key-value objects, inline primitive arrays, tabular arrays, list items with -, and nesting by indentation, with comma, tab or pipe as the delimiter. Integers longer than JavaScript can hold, such as a 19-digit ICCID, keep every digit in the XML because the page swaps them out before decoding and puts the digits back afterwards.
Is the XML valid?
Yes, it is well-formed. There is a single <root>; if the TOON document is a top-level list, its entries become <item> children. Keys that would be illegal as XML names are rewritten: first name turns into first_name and 2fa into _2fa. There is no schema, so whether it is valid for your consumer is a separate question; run it through the XML Validator if you want a second opinion on the syntax.
How are special characters handled?
&, < and > in your values are written as XML entities, and control characters XML 1.0 doesn't allow are dropped. Quotes and apostrophes don't need escaping in element text, so they're left as they are.
Can I convert XML back to TOON?
Not on this page, but it takes two hops: run the XML through XML to JSON, then paste the JSON into JSON to TOON. Expect some reshaping on the way, since repeated XML elements only become a TOON table when every record has the same fields.
Does it work with large datasets?
It handles exports of several thousand rows without trouble on an ordinary laptop, since nothing waits on a network round trip. The practical limit is the editor, which slows down once the input or the XML output reaches several megabytes; for files that size, Download is quicker than scrolling the output.
Other TOON Tools You Might Need
If XML is not the format you actually need, or the TOON itself needs checking or tidying first, these TOON pages cover the rest: