JSON ↔ XML Converter

Convert JSON to XML and back — nested objects, arrays, and XML attributes supported.

JSON

6 chars

XML

52 chars

Usage guide

Convert between JSON and XML — supports nested objects, arrays, and XML attributes (`@`).

  • Paste JSON on the left and hit JSON → XML; paste XML on the right and hit XML → JSON.
  • Multiple root keys get wrapped in a `root` element when converting to XML.
  • Format buttons indent each format.
  • Editors stack vertically on mobile, side-by-side on wide screens.

How to use

Paste JSON to get XML, or paste XML to get JSON — handles nested objects, arrays, and @ attributes. Format buttons indent each format.

Frequently asked

Are attributes preserved?
Yes — XML attributes use the @ prefix in JSON.
What if JSON has multiple root keys?
They're wrapped in a single root element for valid XML.
Is my data uploaded?
No — everything runs locally in your browser.
JSON to XMLXML to JSONJSON XML converterXML parserjson2xml

Related tools