Free Online JSON to XML Converter

Need to feed JSON into a SOAP endpoint or legacy integration? JSON to XML in one click — paste your JSON, hit Convert and download a clean indented XML document. Runs in your browser, nothing uploaded.

or

What does a JSON to XML converter do?

JSON dominates modern APIs, but plenty of systems — SOAP services, government portals, RSS readers, XSLT pipelines, financial messaging — still speak XML. A JSON to XML converter walks the input data tree, maps keys to element names, and emits a well-formed XML 1.0 document so the same payload can travel between both worlds without losing structure.

JSON Pretty escapes special characters per the XML spec, supports attributes via an "@_" key prefix, and produces UTF-8 output with two-space indentation. Need to inspect or reshape the source first? Open it in our JSON editor for a tree view with search and copy-by-path. New to JSON? Our beginner's guide to JSON walks through the structure with examples.

Example

The same data, before and after conversion:

JSON input
{
  "book": {
    "title": "JSON Pretty",
    "author": "Eugene",
    "year": 2026
  }
}
XML output
<?xml version="1.0" encoding="UTF-8"?>
<book>
  <title>JSON Pretty</title>
  <author>Eugene</author>
  <year>2026</year>
</book>

How to Use

Convert JSON to XML in three simple steps — no account needed

1

Paste or upload your JSON

Paste raw JSON, or click "Upload file" to load a .json file from your device.

2

Click Convert to XML

Press Convert. Keys become element names, primitive values become text content, and the result is emitted with two-space indentation.

3

Copy or download the XML

Copy the XML to the clipboard, or download a .xml file ready for SOAP, XSLT, RSS feeds or enterprise integrations.

Benefits of Converting JSON to XML format

Why convert JSON to XML? A few cases where XML is the better fit.

Native for SOAP and enterprise systems
Banking gateways, government services, B2B integrations and legacy ERP systems still speak XML. Converting JSON output from a modern API drops it straight into those pipelines.
Schema validation with XSD
XML Schema (XSD) is the standard way to assert document shape, types and cardinality. Converting to XML lets you plug the result into XSD validators that have been battle-tested for two decades.
Document-oriented features
XML supports mixed content, processing instructions, namespaces and CDATA — features that genuinely matter when the payload is a document rather than a record. JSON cannot express any of them.
Powerful tooling: XPath and XSLT
XPath queries any node by path; XSLT transforms one XML document into another, into HTML or into plain text. Converting JSON to XML unlocks both for downstream pipelines without writing custom code.
Standard for RSS, Atom and sitemaps
Feed formats, sitemaps and OPML files are all XML. If your generator produces JSON internally, a quick conversion turns the output into a publish-ready feed file.

Get JSON Pretty in your browser

Format any JSON response and explore it in a clean tree view — right where you open it, no copy-paste.

4.8·40+ reviews on Chrome Web Store
Chrome iconAdd to Chrome
JSON Pretty logo

Frequently asked questions

It parses the input JSON and emits the same data tree as a well-formed XML 1.0 document. Object keys become element names, primitive values become text content, arrays become repeated sibling elements, and the result starts with a standard "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" declaration.

If the top-level JSON is a single object with one key, that key becomes the root element. If the top-level is an array, a primitive or a multi-key object, the converter wraps the data in a "<root>" element so the result is always well-formed XML.

XML has no native array type. Each element of a JSON array is emitted as a separate sibling element with the same tag name. For example, "items: [1, 2, 3]" becomes three "<items>" elements in a row inside the parent.

Yes. Keys prefixed with "@_" are emitted as attributes on the surrounding element rather than as child elements. So { "book": { "@_id": "42", "title": "..." } } produces <book id="42"><title>...</title></book>.

Yes. The converter escapes "<", ">", "&", quotes and control characters per the XML specification, so the output is always well-formed regardless of what is in the source strings.

XML is text-only, so all primitive values are emitted as their string representation: 1 becomes "1", true becomes "true", null becomes an empty element. If you need typed values on the way back, the matching XML to JSON converter restores them.

Yes. Conversion runs entirely in your browser. Nothing is sent to any server, nothing is stored.

Yes. Multi-megabyte payloads are handled comfortably in the browser. Very deep trees may take a moment longer because the XML output expands every key into its own line.

XML 1.0 with UTF-8 encoding — the universally supported baseline. Every modern parser, XSLT engine and SOAP client accepts this without configuration.

Yes — use the matching XML to JSON converter for the reverse direction.

No. The output is a plain XML document with the XML declaration and nothing else. If you need a DOCTYPE or schema reference, add it by hand after downloading.