HTML Formatter
Beautify and indent HTML markup.
OpenWrap a JSON object in XML elements for systems that only accept XML payloads.
Start from an object; wrap top-level arrays in one first.
Every key turns into a tag under a single <root> element.
List items become repeated elements named after the key.
Copy the indented XML or download it as a file.
A legacy SOAP service or an ERP import screen only accepts XML, but the data you have comes from a modern JSON API. Rather than typing tags by hand, paste the JSON and get an XML draft to adjust.
The converter wraps everything in a <root> element and adds an XML declaration. Each object key becomes an element with the same name, strings, numbers and booleans become text content (with &, < and > escaped), and null becomes an empty self-closing element. Arrays are written as repeated elements named after their key with a trailing s removed, so "tags": ["a", "b"] turns into two <tag> elements without a wrapper. The result is indented and can be downloaded as data.xml.
Two things need care. Keys are used as tag names unchanged, so keys with spaces, leading digits or symbols like @ produce invalid XML; rename them in the JSON first. And if the top-level value is an array, each item becomes its own <root> element, which leaves the document without a single root, so wrap the array in an object such as {"items": [...]}. Check the result by reading it back as JSON, tidy a hand-edited version in the XML Formatter, or produce a config-style file with JSON to YAML instead.
The mapping is done by a short recursive function in the page, without any conversion service involved.
Keyboard shortcut
Answers for this tool. For site-wide help, open the FAQ hub.
Not in the tool. The root is always
No. Every key becomes a child element. If the target system expects attributes, convert the relevant elements by hand after generating the draft.
The output passes through the site's indenter, which places element text on a separate line under its tag. Most XML parsers handle this, but systems that compare text exactly may need the whitespace trimmed.