Skip to main content

XML to YAML

Convert XML to YAML online. Choose how attributes are written, force lists, and keep numbers as text or detect them. Free and private.

More options

XML

Stays in your browser

YAML

The result appears here after you press Convert.

Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)

Next steps

Done here? Use the Send to… menu on the result to carry it on to YAML ↔ JSON Converter.

Free Online XML to YAML

Paste XML and get readable YAML, for example to move a configuration file between formats. Attributes can be prefixed with @ or merged. It gives developers a quick browser-based way to solve a focused xml to yaml task before moving the result into a project.

How to use XML to YAML

Paste your data into the box on the left, or open a file, then press Convert. Repeated sibling elements become a YAML list. Text next to attributes is kept under the key #text.

Common mistakes

  • Pasting XML with an unclosed tag: the error names the line.
  • Mixed content such as text between child elements: the text is joined under #text.

Frequently asked questions

Why are numbers in quotes?
XML has no number type, so values are text. Turn on "Detect numbers and true/false" under More options to write them without quotes.
Can I convert back?
Use YAML to JSON and then a JSON to XML tool: attributes written with @ can be mapped back.
What happens to comments?
They are dropped; YAML has comments but XML comments are not part of the data.
Is my data uploaded anywhere?
No. The conversion runs in your browser and nothing you paste or open is sent to a server.
How do I use this xml to yaml tool?
Use the interactive controls above; processing stays in your browser and the result is intended as a practical starting point for development work.

More Formatters & Parsers

View all Formatters & Parsers tools →