YAML to XML: A Simple Subset for Flat Configs
YAML reads like notes and XML reads like structure. For flat configs, turning one into the other is a mechanical key-to-tag swap.
What is the YAML to XML Converter?
This converter covers a simple, everyday subset of YAML: top-level key and value pairs plus lists written with dashes. Each key becomes an element, each value becomes its text, and each list becomes a parent element holding item elements. Deeply nested maps, quoted multi-line strings, and anchors fall outside this subset and are best handled by a full YAML parser.
How to use it
- Paste simple YAML with key-value pairs.
- Add lists with a dash on each item line.
- Click Convert to XML.
- Copy the XML with its root element.
Worked example
YAML with name Ada, age 36, and a favourites list becomes XML with name, age, and favourites elements under a root.
How do I turn simple YAML into XML?
Make each key an element with its value as text, and wrap each dash list in a parent element holding one item element per entry.
Frequently asked questions
Which YAML does this subset cover?
Top-level keys with plain values, plus lists of plain items under a key.
What happens to nested maps?
Nested maps are outside this simple subset; keep the input flat or use a full YAML parser.