Code · Made a little simpler

XML to YAML Converter

Convert XML to YAML locally. Keep attributes, repeated tags, mixed text and namespace declarations, or read typed values from XPath functions XML.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

XML to YAML Converter: how to use it

  1. Choose Ordered XML nodes for general XML. Choose Typed JSON values only when the source uses the XPath functions vocabulary.
  2. Paste XML or select a UTF-8 file, then convert.
  3. Inspect the YAML preview and save the full converted.yaml file.

Limits and notes

Local files must be UTF-8 and at most 4 MiB. XML input supports up to one million UTF-16 code units, 100,000 nodes and 128 element levels. DTDs are excluded. With the ordered mapping, XML attribute and character data remain strings. The typed mapping reads explicit scalar types from the XML vocabulary.

How your privacy works →

XML to YAML Converter: common questions

Will 007 lose its leading zeroes in YAML?

In the ordered mapping an attribute or text value remains a string. The YAML writer quotes string data so a YAML reader can distinguish it from a number.

How does YAML retain more than one child with the same tag?

The children field is a sequence. Each element is a separate item, so repeated names retain their order.

Guides