Convert YAML or JSON to XML and XML back to YAML or JSON in your browser. Attributes are kept as @_ keys and repeated tags become lists. Invalid XML is reported with its line and column. Choose the left pane format, indent size and pretty printing, then copy or download the result.
XML represents data as nested tags with attributes, while YAML and JSON use keys, lists and values. This tool maps one to the other so you can, for example, turn an XML API response or config file into readable YAML or JSON, or build XML from a YAML document. The left pane holds YAML or JSON and the right pane holds XML.
<title lang="en"> becomes @_lang: en, and element text with attributes is stored under #text, so data can be converted back<tag> siblings become a list, and a list becomes repeated elements0123 stay strings instead of turning into numbers<empty/>XML input:
To YAML result:
No. Parsing and conversion run in your browser (js-yaml and fast-xml-parser); nothing is uploaded.
XML needs named elements, so the YAML or JSON must start with key: value pairs. Wrap a top-level list or single value in a key first, for example items: [...].
Every key becomes a tag name, and XML tag names cannot contain spaces or start with a digit. Rename keys like first name or 1st before converting.
<?xml ...?> declaration?Comments are dropped. The declaration is kept as a ?xml key (with @_version and so on), and converting that data back with To XML writes the declaration again.