Something wrong with this tool?
About JSON To XML Converter Online
This tool converts JSON documents into XML. Object keys become element names, values become text content or nested elements depending on type, and arrays produce repeated child elements. The resulting XML mirrors the JSON tree.
JSON to XML conversion is required when integrating modern API output with older enterprise systems that expect XML — SOAP services, configuration formats from the 2000s, or legacy data interchange contracts.
Options cover attribute handling, XML declaration, indentation style, and root element naming. Output is well-formed XML ready for use with any XML parser.
How to use this tool
How to convert JSON to a simple XML document
Paste your JSON
Drop a JSON object or array into the "JSON" field. The top-level value is wrapped in a `<root>` element so the output is always a well-formed XML document.
How nesting maps
Objects become nested elements keyed by their property name. Arrays become repeated `<name_item>` elements with the parent key as the prefix. Primitives become element text, XML-escaped (& < >).
null and undefined
A null or undefined value is emitted as a self-closing element (`<key />`) rather than an empty element with text — handy when consumers distinguish "no value" from "empty string."
Press Run
Output is a single `xml` field containing the full document with `<?xml version="1.0" encoding="UTF-8"?>` prolog and `<root>…</root>` body. There are no attributes or namespaces — only elements.