JSON to XML Converter: Convert JSON to XML Online
Converting JSON to XML maps objects to elements, arrays to repeated elements, and scalar values to text content, with special characters correctly escaped. Paste any JSON document and get well-formed, indented XML back, converted entirely in your browser.
How it works
- 1
Paste your JSON into the editor.
- 2
Click Convert to XML: keys become element names, arrays become repeated elements.
- 3
Copy the well-formed XML output (validate it with one click if you like).
Frequently asked questions
How are JSON arrays converted to XML?
Each array item becomes a repeated element with the array's key as the element name: "item": ["a","b"] becomes <item>a</item><item>b</item>. Arrays of objects nest their members inside each repeated element.
What happens to JSON keys that aren't valid XML names?
Keys starting with digits or containing spaces/special characters are sanitized (prefixed or character-replaced) so the output is always well-formed XML. The @attributes convention from the XML→JSON converter is honored in reverse.
Will my JSON values be escaped safely?
Yes. The &, <, and > characters in values are escaped to &, <, > so the output always parses. Run it through the XML validator to confirm.
Related tools
Convert XML to JSON online. Attributes preserved as @attributes, repeated elements become arrays. Free and browser-based, with nothing uploaded.
Validate XML online: well-formedness check with exact error messages and fixes, document statistics, and namespace report. Free, with nothing uploaded.
Free XML formatter: beautify, pretty-print, tidy and indent XML online, or minify it to one line. Idempotent formatting, no signup, no upload limit.
Create XML online with a form-based generator: build elements, attributes and nesting visually, or generate SOAP envelopes from WSDL schemas. Free.
Parse XML online into an explorable tree: elements, attributes, text and namespaces, plus parse-error diagnosis. Free and browser-based, no signup.