JSON to XML Converter — Free & In Your Browser
JSON in, well-formed XML out — attributes, repeated elements and escaping handled.
🔒 Runs in your browser — files never uploaded ⚡ No signup 💯 Free
Convert JSON to well-formed XML for the systems that still speak it — SOAP endpoints, legacy imports, RSS-adjacent tooling, enterprise integration. Keys become elements, arrays become repeated elements, and keys prefixed @ become attributes, so round-tripping with our XML-to-JSON converter preserves structure.
All conversion is local to your browser.
How to use JSON to XML
- Paste JSON into the left pane.
- Read the XML on the right — declaration included, two-space indented.
- Copy or download as an .xml file.
The mapping, precisely
- A single-key object at the top level becomes the root element; anything else is wrapped in
<root>. - Arrays repeat the element:
{"item":[1,2]}→<item>1</item><item>2</item>— the standard XML idiom for lists. @keybecomes an attribute,#textbecomes element text beside children — the same convention our XML to JSON converter produces, so the two round-trip.- Escaping is automatic:
&,<,>and quotes in your data are entity-escaped. Hand-built XML that skips this is the source of half of all "invalid XML" errors.
What XML can't express back
XML has no native types — everything is text — so numbers and booleans arrive as strings on the far side, and null becomes an empty element. If the consuming system has a schema (XSD), its types win; this converter's job is well-formedness, not schema validation.
Key names become tag names
XML element names are stricter than JSON keys: no spaces, can't start with a digit. Keys that would make an illegal tag are replaced with item rather than producing broken markup — rename keys in the JSON if you need specific tags.
Frequently asked questions
How do I set XML attributes from JSON?
Prefix the key with @: {"person":{"@id":"1","name":"Ada"}} produces <person id="1"><name>Ada</name></person>. Text beside children goes in a #text key. These are the same conventions the XML-to-JSON direction emits, so data round-trips.
How are arrays represented?
As repeated elements — {"item":[1,2,3]} becomes three <item> elements in sequence, which is the standard XML idiom for lists. There's no invented wrapper element.
What determines the root element?
A single-key top-level object supplies it: {"order": {…}} roots at <order>. Anything else — arrays, multi-key objects — is wrapped in <root>, since XML requires exactly one root.
Do numbers and booleans survive?
They're written as text, because XML has no types — 1815 becomes <born>1815</born>, indistinguishable from a string. The consuming system's schema decides what they mean; that's where XML keeps its types.