jsonecho

XML to YAML

Convert XML configuration or data into readable YAML.

Loading the tool...

How to use XML to YAML

  1. Paste your XML.
  2. Choose a 2 or 4 space indent.
  3. Copy the YAML.

About XML to YAML

Teams moving from older Java or .NET tooling to Kubernetes, Ansible or GitHub Actions often have XML on one side and YAML on the other. This converter reads the XML as data first, then writes that data as YAML, so you get a faithful structure without retyping.

Attributes appear as keys starting with @_ and mixed text appears as #text. You will probably rename those for your target system, but the hard part, the nesting, is done.

Frequently asked questions

Is the conversion reversible?

Mostly. Convert the YAML back with YAML to XML. Comments and processing instructions in the original XML are not carried over.

Will it keep my XML comments?

No, comments are dropped. YAML supports comments, but this tool reads the data rather than the markup.

Are numbers turned into real numbers?

Yes by default. Switch off the number option if you want everything as text.

More in Converters

All tools →