JSON to XML
Convert JSON to pretty-printed XML with a single <root> element. Arrays produce repeated sibling elements; special characters (<, >, &, ") are XML-escaped.
JSON in, XML out
See exactly how JSON maps onto XML — the converter on this page produces output identical to the example below.
{
"book": {
"title": "Example",
"author": "Alice",
"tags": ["dev", "tools"],
"year": 2026
}
}<?xml version="1.0" encoding="UTF-8"?>
<root>
<book>
<title>Example</title>
<author>Alice</author>
<tags>dev</tags>
<tags>tools</tags>
<year>2026</year>
</book>
</root>What you'll use this for
Converting JSON to XML is a daily task in API integration, config management, and data pipelines.
API integration
Convert JSON payloads into XML for SOAP-based or legacy APIs.
Config migration
Move JSON application configs into XML-consuming tools.
Data import
Feed XML-only data warehouses or BI tools from JSON sources.
CI pipelines
Generate XML reports (JUnit, NUnit) from JSON test outputs.
How to convert JSON to XML
Paste your JSON
Drop it into the left editor. The sample is loaded by default — clear it or click the wand to reload.
Click Convert
Or leave auto-convert on for live updates. Conversion runs entirely in your browser — no upload.
Copy or download
Copy to clipboard or save the output as data.xml.
Reverse if needed
Jump to the XML to JSON converter for a round-trip check.
Frequently asked questions
XML is text-only — types are stringified. Use XSD/DTD downstream if you need typed XML.
Each key becomes a child element. Arrays produce repeated sibling elements with the parent key as the element name.
Yes. No signup, no limits.
You'll see a clear parse error in the output panel.
Use the XML to JSON converter for the opposite direction.
About JSON and XML
XML (Extensible Markup Language) predates JSON by years and is still dominant in enterprise systems, SOAP, RSS/Atom, SVG, and Microsoft Office documents. JSON is more compact but less expressive (no comments, namespaces, or attributes).
Common pitfalls
- JSON keys must be valid XML element names — special characters in keys may break the output.
- JSON arrays don't map cleanly to XML; this tool emits repeated sibling elements.
- XML attributes have no direct JSON equivalent — they're not generated here.
- Always include the XML declaration for non-UTF-8 documents.