How to use JSON to XML Converter
What it does & when you need it
Some systems still insist on XML — a legacy SOAP endpoint, an Android layout, an RSS or sitemap file, a bank integration. When your data already lives as JSON, this converter turns it into clean, indented XML wrapped in a single root element. Objects nest, arrays repeat, primitives become element text, and every unsafe character is escaped so the result is well-formed. It all happens in your browser, so nothing you paste is uploaded.
How to use
- Paste JSON into the input.json buffer, or press Sample to load an example object.
- Optionally set a Root name in the toolbar —
response,config, or whatever your consumer expects. The default isroot. - Watch output.xml update as you type. Invalid JSON is reported in the status bar rather than producing broken markup.
- Press Copy XML or
Ctrl/Cmd+Enter. To pretty-print the XML further or check it, try the XML Formatter.
Things worth knowing
Arrays turn into repeated tags, not a container. XML has no indexed list, so
{ "tag": ["a", "b"] } becomes <tag>a</tag><tag>b</tag>. There is no wrapper
element per item — the repetition of the tag name is the list.
There must be exactly one root. That is why everything is wrapped. A
top-level primitive becomes the root's text, and a top-level array is wrapped in
the root with each entry emitted as an <item> element, because anonymous array
entries have no tag name of their own.
Escaping keeps the output valid. The five metacharacters &, <, >, ",
and ' are escaped to &, <, >, ", and ' in text.
Keys that are not legal XML names — those with spaces or a leading digit — are
rewritten with underscores, so a key like first name becomes first_name.
Need the reverse trip? Use XML to JSON.