XML to YAML Converter
Convert XML documents into YAML. Free, instant, and no signup required.
About XML to YAML conversion
XML is the long-standing format for SOAP web services, Office document internals (docx/xlsx), and schema-validated enterprise data exchange — its attribute and namespace support has no direct JSON equivalent. YAML is what most infrastructure-as-config tools use under the hood, from Kubernetes manifests to CI pipeline definitions — its comment support and multi-document format are things JSON simply lacks.
YAML has no native attribute syntax, so this tool uses the same "@name" key convention as the JSON/XML converter — an XML attribute becomes an @-prefixed YAML key instead of disappearing, and converts back cleanly.
How to convert XML to YAML
- Paste your XML into the left editor, or click sample above it to try example data.
- Click Convert. The YAML result appears on the right instantly.
- Click copy to copy the result, or download to save it as a file.
Example
Input (XML):
<person>
<name>Ada Lovelace</name>
<role>Mathematician</role>
<active>true</active>
<skills>math</skills>
<skills>programming</skills>
</person>
Output (YAML):
person:
name: Ada Lovelace
role: Mathematician
active: 'true'
skills:
- math
- programming
Frequently asked questions
"@name" key, the same convention this tool's JSON/XML converter uses — since YAML has no native attribute syntax either, an @-prefixed key is the least lossy way to carry an XML attribute across formats.