TOML to XML Converter Online — Free & Private

Paste TOML and get XML output. Everything runs in your browser and nothing is uploaded.

Loading…
TOML → XML for configuration handoffs
Reads TOML and writes it as XML elements inside a root element, with the same rules as JSON → XML.

Developer notes

The conversion goes through JSON, so it follows the rules of JSON → XML. Keys become child elements, never attributes. Array items are named after the parent key without its last letter, plus _item, so tags gives tag_item. Comments are dropped, and dates and times are written as ISO 8601 text. This pair has no output options. Namespace declarations are not written.

Use cases

Hand a Cargo or pyproject file to a system that only reads XML. Compare the shape of a TOML file with an XML schema. Preview how nested tables become elements.

About these options

For CSV output, choose the delimiter, how fields are quoted, the line endings and whether to write a header row. Auto uses a comma in English and a semicolon in French, German and Spanish, as Excel expects. For CSV input, the delimiter is detected on the first line (comma, semicolon, tab or pipe). You choose whether that line holds the column names. JSON output can use 2 or 4 spaces or a single line, with an optional recursive key sort. XML output can be pretty-printed with a chosen indent width. YAML output takes an indent width and a quoting mode for strings. XML comments are dropped, because the conversion goes through a JSON tree.

Examples

Package and dependencies

Input

[package] name = "fastminify-cli" version = "2.1.0" edition = "2021" [dependencies] serde = { version = "1.0", features = ["derive"] } tokio = "1.35"

Output

<?xml version="1.0" encoding="UTF-8"?> <root> <package> <name>fastminify-cli</name> <version>2.1.0</version> <edition>2021</edition> </package> <dependencies> <serde> <version>1.0</version> <feature_item>derive</feature_item> </serde> <tokio>1.35</tokio> </dependencies> </root>

Array, root key and table

Input

title = "Release" tags = ["stable", "lts"] [owner] name = "Platform team"

Output

<?xml version="1.0" encoding="UTF-8"?> <root> <title>Release</title> <tag_item>stable</tag_item> <tag_item>lts</tag_item> <owner> <name>Platform team</name> </owner> </root>

Related tools

Other converters that start from TOML are linked on this page.

TOML → XML FAQ

Rules of the output

Are attributes written?

No. Every key becomes a child element.

How are arrays written?

Each item becomes an element named after the parent key without its last letter, plus _item, and the parent tag is dropped.

What happens to TOML dates?

They are read as dates and written as ISO 8601 text inside the element.

Is my data sent to a server?

No. The conversion runs in your browser, and FastMinify never receives what you paste.

Convert TOML to JSON, YAML, XML, CSV, Properties and INI.