JSON to XML Converter
Convert JSON to clean, well-formed XML — attributes, arrays and escaping handled for you.
Root element
Array item name
Indent
JSON input
XML output
Convert JSON to clean, well-formed XML — attributes, arrays and escaping handled for you.
Root element
Array item name
Indent
JSON input
XML output
In short: A JSON to XML converter maps JSON objects to nested XML elements and arrays to repeated elements. RealJSON produces well-formed XML with escaped characters, valid element names and optional attributes — all in your browser.
Legacy systems, SOAP services and many enterprise integrations still expect XML. Paste the JSON your API returns and get an XML document you can send or inspect.
The mapping follows the same conventions as the XML to JSON converter (@attr and #text), so you can convert in both directions and get the same structure back.
Each key becomes an element. Strings, numbers and booleans become text; null becomes an empty element.
Arrays repeat the parent key: {"tag":["a","b"]} → <tag>a</tag><tag>b</tag>. Top-level arrays use the "array item name".
Keys starting with @ become attributes; #text sets mixed text content.
& < > " ' are escaped and illegal name characters are replaced, so the result always parses.
Paste your JSON, choose a root element name, and the XML is produced instantly. Objects become nested elements, arrays repeat the element, and special characters are escaped.
An array under a key repeats that key as a sibling element — {"tag":["a","b"]} becomes <tag>a</tag><tag>b</tag>. A top-level array is wrapped in the root element using the array item name.
Yes. Keys that start with @ (for example "@id") become attributes, and a "#text" key sets the element text — the same convention the XML to JSON tool uses, so conversions round-trip.
Invalid characters are replaced with underscores and names that start with a digit get a leading underscore, so the output is always well-formed.
No — conversion runs locally in your browser.
XML to JSON · JSON to YAML · JSON to CSV · JSON Formatter
Browse all free JSON tools →
Related tools