jarvisbox

XML to YAML Converter Online

Convert XML to YAML online in your browser — attributes become @attr keys, arrays auto-detected. 100% client-side, no upload, no signup required.

100% client-side · no upload. XML is parsed and converted inside your browser. Nothing is sent to a server.

Drag and drop an XML file onto the text area to load it.

Download .yaml

Paste XML above and click Convert.

How to use

  1. Paste a valid XML document into the input box, or drag and drop an .xml file onto it.
  2. Click XML → YAML — attributes appear as @attr keys, repeated sibling tags become arrays.
  3. Click Copy to copy to the clipboard or Download .yaml to save the file.

Related format & data tools

Common use cases

常见问题

How are XML attributes handled in the YAML output?
XML attributes are mapped to YAML keys prefixed with "@". For example, <person id="1"> becomes "@id": "1" inside the person object. This convention (popularised by xmltodict and AWS SDK) is the de-facto standard and keeps attribute data adjacent to element content without losing information.
When are XML child elements converted to YAML arrays?
If two or more sibling elements share the same tag name they are automatically collected into a YAML sequence (array). A single child element remains a plain mapping. This mirrors how tools like js-yaml and Python's xmltodict handle repeated XML children.
Does my XML leave my device?
No. All parsing and conversion happens entirely inside your browser. Your XML is never uploaded to any server, never stored, and never logged. The tool works fully offline once the page has loaded.
What XML features are supported?
Standard XML 1.0 documents including nested elements, attributes, text content, CDATA sections, and processing instructions. DTD validation and XInclude are not performed. The XML declaration (<?xml version="1.0"?>) is ignored — it is not part of the YAML output.
Does it work on mobile?
Yes. The tool is mobile-first and works on iPhone Safari and Android Chrome. Paste your XML into the text area and tap Convert.
Can I convert a batch of XML files?
You can drag and drop an XML file onto the input area — the file contents are loaded automatically. For bulk conversion of many files, each file must be processed one at a time in the browser tool.

Last updated:

反馈这个工具的问题