JSON to XML

Wrap JSON payloads in XML for tools that expect element trees. Output is pretty-printed with a root element. Arrays become repeated item elements.

Result

Paste JSON, then Convert. Output is wrapped in a root element.

How to convert JSON to XML

  1. Paste JSON into the input.
  2. Click Convert.
  3. Review the pretty-printed XML (arrays become repeated item elements).
  4. Copy or download the XML. JSON null becomes an empty element.

FAQ

Array items are emitted as repeated item child elements under their parent tag.
XML has no null type. Null values become empty text nodes, not JSON null, on a reverse conversion.
Yes. The payload is wrapped in a root element so the document is always a single XML tree.
No. Conversion is client-side only.
Element names are derived from keys with characters XML disallows replaced or sanitized. Review output when keys contain symbols XML cannot use in tag names.

Related tools