← All Tools
XML To YAML Converter🔒 100% local
XML to YAML conversion. Privacy-first, no server uploads, no tracking.
XML To YAML Converter walks the XML you paste with a small hand-written parser for elements, attributes and text, then prints an indented YAML-shaped tree. An element that carries attributes becomes a mapping whose attribute keys are prefixed with #, with its children written underneath; a leaf becomes tag: value. An XML declaration at the start is ignored.
How to use it
- Paste the XML into the Input box.
- Press Process.
- Read the indented tree under the Converted line, or Copy Output to take it away.
Worked example
<root><name>John</name></root>becomesConverted XML to YAML.
root:
name: JohnThe result is YAML-shaped text, not something a YAML parser will accept - see the attribute note in Limits.
When to use it
- Getting a readable outline of a small XML config or API response before deciding which fields matter.
- Sketching a document's structure for notes or documentation.
- Converting a pasted XML fragment when no parser is installed on the machine.
What it does not do
- Repeated sibling elements are dropped: <list><item>a</item><item>b</item></list> produces "list:" followed by a single "-" line and neither value.
- The attribute output is not valid YAML. Attribute keys are written as #id: 7, and # begins a comment in YAML, so a parser reading this back loses the attributes.
- Text mixed with child elements is lost: <note><br/>ok</note> prints the br element with an empty value and the "ok" never appears.
- CDATA, comments, processing instructions, namespaces and entity references are treated as ordinary text or skipped, and mismatched tags abort with an error naming the tag.