Convert JSON to XML Online — Free
Runs 100% in your browser — your files never leave your device.
Some feeds, SOAP services, and configuration loaders still demand XML. Paste a JSON object and get formatted XML with a proper declaration: single-key objects use their key as the root element, multi-key objects are wrapped in <root>. Non-object input gets a friendly explanation instead of a cryptic failure — and everything converts locally.
How it works
- 1
Paste your JSON
An object works best; wrap lone values in one, like {"data": 42}.
- 2
Read the XML
Nested objects become nested elements; arrays become repeated tags.
- 3
Copy or download
Copy the XML or download it — declaration included.
About this tool
How the conversion works
The tool maps your JSON structure into an XML tree: objects become elements, arrays become repeated elements, and primitive values become text content. A root element wraps everything, since XML requires exactly one — special characters escape automatically.
The consumer defines the shape
XML integrations usually expect specific element names and a specific root. Name your JSON keys to match the expected elements before converting, and check whether the consumer wants attributes (which need a pre-processing step) rather than child elements.
The bridge in the other direction
Going the opposite way — XML arriving, JSON needed — is the XML to JSON tool. Between the two, either format converts to the other without a hand-written script.
Frequently asked questions
What becomes the root element?
JSON allows multiple top-level keys; XML requires one root. The tool wraps the converted content in a standard root element — rename it in the output if your consumer expects a specific name.
How do JSON arrays convert?
Each array item becomes a repeated element under a parent named for the array key — the natural XML representation of a list.
Are special characters safe in the output?
Yes — values escape to XML entities automatically, so ampersands and angle brackets in your data produce well-formed XML.