Need to feed JSON into a SOAP endpoint or legacy integration? JSON to XML in one click — paste your JSON, hit Convert and download a clean indented XML document. Runs in your browser, nothing uploaded.
or
JSON dominates modern APIs, but plenty of systems — SOAP services, government portals, RSS readers, XSLT pipelines, financial messaging — still speak XML. A JSON to XML converter walks the input data tree, maps keys to element names, and emits a well-formed XML 1.0 document so the same payload can travel between both worlds without losing structure.
JSON Pretty escapes special characters per the XML spec, supports attributes via an "@_" key prefix, and produces UTF-8 output with two-space indentation. Need to inspect or reshape the source first? Open it in our JSON editor for a tree view with search and copy-by-path. New to JSON? Our beginner's guide to JSON walks through the structure with examples.
The same data, before and after conversion:
{
"book": {
"title": "JSON Pretty",
"author": "Eugene",
"year": 2026
}
}<?xml version="1.0" encoding="UTF-8"?>
<book>
<title>JSON Pretty</title>
<author>Eugene</author>
<year>2026</year>
</book>Convert JSON to XML in three simple steps — no account needed
Paste raw JSON, or click "Upload file" to load a .json file from your device.
Press Convert. Keys become element names, primitive values become text content, and the result is emitted with two-space indentation.
Copy the XML to the clipboard, or download a .xml file ready for SOAP, XSLT, RSS feeds or enterprise integrations.
Why convert JSON to XML? A few cases where XML is the better fit.
Format any JSON response and explore it in a clean tree view — right where you open it, no copy-paste.
Reverse direction — convert an XML document into a clean JSON tree.
Full editor with tree view, search and copy-by-path for working with the source JSON.
Convert a JSON array of objects into CSV ready for Excel, Numbers or Google Sheets.
Convert JSON into clean YAML ready for Kubernetes, Docker Compose or CI configs.
Generate a Draft 2020-12 JSON Schema from a sample document for validators and code generators.
Parse YAML configs into clean indented JSON ready for APIs and code.
It parses the input JSON and emits the same data tree as a well-formed XML 1.0 document. Object keys become element names, primitive values become text content, arrays become repeated sibling elements, and the result starts with a standard "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" declaration.
If the top-level JSON is a single object with one key, that key becomes the root element. If the top-level is an array, a primitive or a multi-key object, the converter wraps the data in a "<root>" element so the result is always well-formed XML.
XML has no native array type. Each element of a JSON array is emitted as a separate sibling element with the same tag name. For example, "items: [1, 2, 3]" becomes three "<items>" elements in a row inside the parent.
Yes. Keys prefixed with "@_" are emitted as attributes on the surrounding element rather than as child elements. So { "book": { "@_id": "42", "title": "..." } } produces <book id="42"><title>...</title></book>.
Yes. The converter escapes "<", ">", "&", quotes and control characters per the XML specification, so the output is always well-formed regardless of what is in the source strings.
XML is text-only, so all primitive values are emitted as their string representation: 1 becomes "1", true becomes "true", null becomes an empty element. If you need typed values on the way back, the matching XML to JSON converter restores them.
Yes. Conversion runs entirely in your browser. Nothing is sent to any server, nothing is stored.
Yes. Multi-megabyte payloads are handled comfortably in the browser. Very deep trees may take a moment longer because the XML output expands every key into its own line.
XML 1.0 with UTF-8 encoding — the universally supported baseline. Every modern parser, XSLT engine and SOAP client accepts this without configuration.
Yes — use the matching XML to JSON converter for the reverse direction.
No. The output is a plain XML document with the XML declaration and nothing else. If you need a DOCTYPE or schema reference, add it by hand after downloading.