en

TOML to XML

Convert a TOML file to XML locally - the configuration as well-formed markup, no upload, right in your browser. No daily cap.

Running locally on your device ...

Running locally on your device ...

0%

Is my file uploaded?

No. Everything runs in your browser - your file never leaves your device. How this is verifiable

No upload100% local
Your content stays with youno third-party access
Hosted in GermanyGlobal Content Delivery
Independently auditedTLS A+ · HTTP headers A+

TOML is the configuration language of the Rust and Python world - a Cargo.toml or pyproject.toml writes sections as [package], values right after, and has one feature most other config formats lack: the table array [[server]] for a list of same-shaped sections. This tool takes exactly those three notations - section, curly-brace inline table and table array - and writes well-formed XML with tags and attributes from them, the shape office formats and many enterprise interfaces expect.

smol-toml parses locally in your browser, fast-xml-parser builds the XML from it - both pure JavaScript, no server involved. Whether a table was written as its own section [section], inline as a table { a = 1 }, or as one entry of a table array [[section]]: once parsed, only a plain JavaScript object or array is left, and the TOML notation itself no longer shows in the result. Since an XML document needs exactly one root element, only what sits at the top matters: a single key becomes the root itself as long as its value is not an array; several keys, or one array value alone, get a shared root element placed above them.

That closes the format matrix: JSON, YAML, TOML and XML now convert into one another locally in every direction. TOML distinguishes four date/time kinds (with a zone, without a zone, date only, time only) instead of the one generic timestamp other formats use; smol-toml keeps that distinction, and this tool writes every one of them unchanged as RFC 3339 text. Anchors, aliases or several documents in one file - concepts other configuration formats have - do not exist in TOML, so that worry simply does not apply here. None of it ever leaves your device.

No file-count or daily limits, no account, no paywall, no watermark. Only your device limits the size - up to 2 GB per run. Many online services limit free use to a few runs per day or require an account; here everything runs locally in your browser - with no daily quota and no sign-up.

Specifications

Specifications
Input formatsTOML
Output formatXML
Batch processingNo
ProcessingLocally in your browser (JavaScript)
File uploadNone

In 3 steps

  1. Drop or pick your TOML file.
  2. The tool converts it into XML.
  3. Download the XML file.

Limitations: The result is always well-formed XML. TOML always parses to a table: a single top-level key becomes the XML root element directly, as long as its value is not an array; otherwise - with several keys or an array value - the content is placed under a root element. Sub-tables become nested elements, arrays of tables become repeated elements. Keys that are not valid XML element names are sanitised deterministically (an invalid character becomes _, a leading digit gets a _ prefix, an empty name becomes _); the original name is kept in a name="..." attribute, and name collisions created by this sanitising are reported as a hint. TOML date/time values are written as ISO 8601 text (XML has no date type). TOML comments (#) are lost, since they are not read in when parsing. Control characters not allowed in XML 1.0 are replaced with the Unicode replacement character (U+FFFD) and reported as a hint. Invalid TOML is rejected with a clear message. Lists placed directly inside a list (such as [[1, 2]]) become one <item> element per inner list; converting back to TOML returns them as an object with an item list rather than as a nested list. Attribute names after "@_" are sanitised by the same rule as element names; an attribute whose value is an object or a list, or whose sanitised name collides with another attribute, becomes a child element instead, with the original key kept in name="...". Emoji are not allowed in XML names, so in keys they are replaced with _ characters as well (original in name="..."); in values they stay unchanged. U+FFFE, U+FFFF and lone surrogate characters are also replaced with U+FFFD. Data that would nest deeper than 100 element levels is rejected with the toml-to-xml_too_deep error.

FAQ

Is my file uploaded?

No. The conversion runs entirely locally in the browser - nothing is sent.

Does it work with a Cargo.toml or pyproject.toml?

Yes. Cargo.toml, pyproject.toml and other TOML files are parsed directly and written as XML.

How is the root element determined?

A single top-level key becomes the root; several keys are placed under a root element. Exception: if the single key holds an array, a root element is used as well.

How are date/time values handled?

As ISO 8601 text, because XML has no date type of its own.

Does the reverse work too?

Yes, with our "XML to TOML" tool.

Is TOML to XML free - are there any limits?

Yes. You can use TOML to XML as often as you like: no daily cap, no account, no paywall, no watermark. All selected files together may be at most 2 GB per run; on devices with little memory this bound is lower, because it follows your device's memory.

Related tools

XML to TOML · JSON to XML · TOML to JSON · JSON to JSONL · Images to CBZ · Parquet to CSV