TOML to XML Converter

Convert TOML to XML format

TOML Input

XML Output

Paste your TOML on the left and the XML shows up here.

Or drop a file on this box, , or .

What is TOML to XML Converter?

TOML (Tom's Obvious, Minimal Language) is what you write when a person edits the config: a pyproject.toml, a Cargo.toml, a Hugo or Netlify file. XML (eXtensible Markup Language) is what some programs still insist on reading, from Java app servers to the enterprise systems that exchange config as files. This page bridges the two. Paste TOML on the left and a moment later the right pane shows an XML document with every table and key in it.

The page parses your input against the TOML v1.0.0 specification with the smol-toml library, then walks the result. Each [table] becomes a nested element, each key a child element holding its value as text, and the whole thing sits inside one <root> under an XML declaration. Because TOML has no notion of attributes and XML does, the converter never invents any: everything is an element, which keeps the output easy to feed to a web service or an XSLT step.

Parsing and building the XML both run in this tab, so your TOML is not uploaded. That includes files opened with Upload, which are read locally with the browser's FileReader.

What Makes This Tool Different

Automatic Conversion

Paste TOML and get XML. We handle all the syntax differences – tables become XML elements, values become text nodes, everything gets converted correctly.

Structure Preservation

Tables, arrays and values carry over: dates are written as text in their TOML form, 64-bit integers keep every digit, and multi-line strings are copied as-is without extra indentation.

Validation Built-In

Nothing is converted unless smol-toml accepts the whole document, so a TOML file with a syntax error gives you the parser message, never a half-built XML file.

File Upload Support

Got a big file? Just upload it. Works great for converting those massive TOML configs without copy-pasting.

Download XML

One click to download your XML file. Drop it into your project, use it in enterprise systems, or any XML-based application.

Syntax Highlighting

Both editors highlight their syntax, TOML on the left and XML on the right, so a stray quote on the left or a misplaced tag on the right stands out by colour.

How It Works

Follow these steps to convert TOML to XML.

1

Paste or Upload TOML

Type or paste TOML on the left side (Upload opens a .toml file from disk); a file that does not parse is refused with a message instead of replacing what you had. Sample loads the familiar owner and database example from the TOML website, and Clear empties both panes.

2

View XML Output

Give it about 300 ms after your last edit and the XML on the right is rebuilt. If the TOML has a problem, such as a duplicate key or an unclosed string, the right pane shows "Invalid TOML:" followed by the parser's message and the line it stopped at.

3

Copy or Download

Use "Copy" to grab the XML for pasting, or "Download" to keep it as a .xml file you can drop into your project.

When You'd Actually Use This

Enterprise Systems

An app written in Rust or Python keeps its settings in TOML, but the Java service or middleware next to it reads XML. Convert the shared section once and hand the XML file to that team.

Format Migration

Moving a project from TOML config back to an XML-based toolchain? Paste each file, check that tables and arrays came out the way the new reader expects, then download it.

Web Services

Settings held in TOML sometimes have to be sent to a SOAP endpoint or an older web service. Converting here gives you the element tree to drop into the request body.

Tool Compatibility

Some tools require XML format. Convert your TOML data to XML when working with XML-based systems or applications.

Common Questions

Is my TOML data stored?

No. The TOML is parsed and turned into XML by JavaScript running in this page, and there is no request to our server for the conversion. Close the tab and it is gone.

What TOML formats work?

Anything TOML v1.0.0 allows: standard and dotted keys, inline tables, arrays of tables, multi-line basic and literal strings, and every date and time type. Integers beyond JavaScript's 2^53 limit, like 9223372036854775807, are kept exactly instead of being rounded. One thing to know: a float such as 11.0 is written as 11, because the number goes through JavaScript before it becomes text.

How are TOML tables handled?

A table becomes an element and its keys become children. An array repeats its key, so ports = [8001, 8002] gives two <ports> elements, and each [[sensor]] block becomes its own <sensor>. An empty array or table is kept as a single empty element. Offset date-times keep their offset but gain milliseconds, so 1979-05-27T07:32:00-08:00 is written as 1979-05-27T07:32:00.000-08:00. Keys that are not legal XML names are rewritten, for example "poll interval" becomes poll_interval.

Can I convert XML back to TOML?

Not directly, there's no XML to TOML page. Convert the XML with XML to JSON first, then paste the result into JSON to TOML.

What if my TOML has special characters?

Special characters are properly handled in XML. Strings with XML syntax characters are escaped correctly using XML entities.

Does it work with large TOML files?

Config files are rarely big enough to notice, and conversion runs in the browser without any upload limit. A multi-megabyte TOML document takes longer mainly because the editors have to render it; the parse itself is quick.

Other TOML Tools You Might Need

Before converting, a formatter or validator can tidy and check the TOML. Afterwards, you may need the same data as JSON, YAML or CSV: