XML to YAML Converter

How it works
Indent
Valid XML

Input XML

No problems found. This is valid XML.

About XML to YAML

YAML is a compact way to read the data inside a large XML document, and the format many modern config tools expect. Paste XML and get the same structure as YAML, without the closing tags.

Attributes appear as keys starting with @_, element text next to attributes is stored under #text, and repeated elements become YAML lists.

How to use it

  1. Paste your XML into the Input panel.
  2. Check that the Output dropdown says Convert to YAML.
  3. Choose a 2- or 4-space indent.
  4. Copy the YAML or Download it as a .yaml file.

Frequently asked questions

What happens to XML comments?

Comments are not carried over; only elements, attributes and text are converted.

How are attributes shown?

Each attribute becomes a key with an @_ prefix, for example @_lang: en.

Is my XML uploaded?

No. The conversion runs in your browser.

Related tools