How to use it
- Paste your XML into the input box, upload a .xml file, or drop a file onto the box.
- The YAML appears as you type. Change the indentation if you need to.
- Copy the result or download it as a .yaml file.
Good to know
- Attributes become keys that start with @, and text next to child tags becomes #text. A tag that appears once becomes a single value; a tag that repeats becomes a list.
- Strings are quoted only when YAML needs it, and anchors are never used, so the output is easy to read and to diff.
About the formats
XML
XML wraps data in named tags, with optional attributes. It is still common in SOAP web services, RSS feeds, Office files and enterprise systems.
YAML
YAML is a readable data format that uses indentation instead of brackets. Kubernetes, Docker Compose, GitHub Actions and many CI tools use it for configuration.
Questions
- Is my data uploaded anywhere?
- No. The conversion runs in your browser with JavaScript. Your data never leaves your device, and the tool keeps working if you lose your connection after the page has loaded.
- Why is a single element not a list?
- XML has no separate list type, so the converter can only tell an element is a list when it repeats. If you always need a list, wrap single values in a list after converting.
- Can I convert YAML back to XML?
- Yes. Use the YAML to XML converter, or press the swap button above the editor.