en

XML to TOML

Convert an XML file to TOML locally - the element tree becomes a TOML table, no upload, right in your browser.

Running locally on your device ...

0%

Your files never left your device

    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
    Servers in GermanyGDPR by design
    Independently auditedTLS A+ · HTTP headers A+

    XML is a widespread markup format for data exchange, configuration and documents - with tags, nested elements and attributes. TOML is the highly readable configuration format of the Rust and Python toolchains, with sections in square brackets and plain key-equals-value lines. This tool reads your XML file and writes the same tree as well-formed TOML.

    The conversion runs entirely locally in your browser: fast-xml-parser reads the XML, smol-toml writes the TOML, both pure JavaScript. Because an XML document has exactly one root element, it becomes a TOML table with that root key. Nested elements become sub-tables, repeated elements become arrays. Attributes are preserved and appear - as in XML to JSON - with the @_ prefix; such keys and the text key #text are written as quoted keys in TOML.

    This bridges markup and configuration: an XML record becomes a hand-editable .toml. It stays honest about it: well-formedness is checked before parsing, and invalid XML is rejected with a clear message. If a value cannot be represented in TOML, the tool reports it clearly instead of silently producing something wrong. Nothing is uploaded.

    Specifications

    Specifications
    Input formatsXML
    Output formatTOML
    Batch processingNo
    ProcessingLocally in your browser (JavaScript)
    File uploadNone

    In 3 steps

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

    Limitations: An XML document has exactly one root element, so a TOML table with that root key results. Nested elements become sub-tables, repeated elements become arrays. Attributes (@_) and element text content (#text) are written as quoted TOML keys. Well-formedness is checked before parsing; invalid XML is rejected with a clear message. Values that cannot be represented are reported clearly.

    FAQ

    Is my file uploaded?

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

    How are attributes handled?

    Attributes appear with the @_ prefix and are written as quoted keys in TOML, such as "@_id".

    What happens with repeated elements?

    Elements of the same name occurring several times are collected into a TOML array.

    Why are some keys quoted?

    Keys like @_id or #text are not bare TOML keys; they are correctly written in quotes.

    Does the reverse work too?

    Yes, with our "TOML to XML" tool.

    Related tools