About YAML to XML
Convert YAML data into XML for systems that only accept XML. Each key becomes an element, lists become repeated elements, and the result starts with an XML declaration.
The YAML is validated first, so indentation mistakes are reported instead of producing an unexpected document. If the data has more than one top-level key, it is wrapped in a root element so the XML stays well-formed.
How to use it
- Paste your YAML into the Input panel.
- Check that the Output dropdown says Convert to XML.
- Pick an indent, or turn on Minify for compact XML.
- Copy the XML or Download it as an .xml file.
Frequently asked questions
Can I create XML attributes?
Yes. Use keys that start with @_, such as @_id: 1, and #text for the element’s text.
What if a key is not a valid XML name?
Characters that XML does not allow in names are replaced with underscores, and names that start with a digit get a leading underscore.
Are YAML comments kept?
No. Comments are not part of the data, so they are dropped.