Home › Converters › JSON to XML Converter
JSON to XML Converter
Convert JSON into indented XML. Object keys become elements, arrays become repeated elements, and a special @attributes key sets attributes on an element.
How to use the JSON to XML Converter
- Paste your JSON into the input box. Use "@attributes" inside an object to set attributes, and "#text" for text alongside children.
- Choose an indent style.
- Press Convert.
- Copy or download the XML.
About this tool
JSON keys do not always make legal XML element names, and JSON has no attributes — so this converter documents its conventions on the page: "@attributes" holds an object of attribute names and values, "#text" supplies text content for an element that also has children, arrays repeat the element, and null becomes an empty element. A key that cannot be an XML name (for example one containing a space) is reported as an error rather than producing broken XML.