JSON to XML Converter

Or force a direction:

About this tool

JSON to XML wraps your data in a root element you can name, turning each object key into a child element and each array into a set of repeated elements that share the parent's tag. XML to JSON parses the document with the browser's native DOMParser and walks the tree, storing attributes under keys prefixed with @ and merging repeated child tags into arrays.

The two directions are designed to round-trip cleanly for typical documents, and special characters are escaped so the output always stays well-formed. Invalid JSON or malformed XML is reported as an error instead of producing broken output. Everything runs locally in your browser — your data is never uploaded to any server.

Related tools

JSON FormatterXML FormatterHTML Escape