JSON → XML Converter
Convert JSON to XML online
Paste JSON on the left and get clean, well-formed XML on the right — instantly, with attributes and arrays handled correctly and the result validated. All in your browser.
🔒 100% private — conversion happens entirely in your browser. Nothing is uploaded or stored.
From JSON to well-formed XML in one step
Indentio turns JSON into XML as you type, guaranteeing a single valid root and preserving structure. Attributes, nested objects, and arrays are all mapped predictably, and the output is checked so you always know it’s well-formed.
The mapping rules
- Objects → nested elements, one per key.
- Arrays → repeated elements with the same tag name.
- Keys starting with
@_→ attributes (e.g."@_id": "1"becomesid="1"). - Scalars → the text content of their element.
Tips for clean output
- Use valid XML element names as keys — letters, digits, hyphens and underscores, not starting with a digit.
- Wrap your data in a single top-level object to control the root element name.
- Need the reverse? Use the XML to JSON converter.
Frequently asked questions
How do I convert JSON to XML?
Paste your JSON on the left. Valid JSON is converted to well-formed XML on the right automatically — no button needed. Then click Copy result or Download.
How are JSON keys and values mapped to XML?
Each key becomes an element and its value becomes the element’s content. Keys prefixed with @_ become XML attributes, and arrays become repeated elements. This mirrors the convention used by our XML → JSON converter, so a round-trip is stable.
What if my JSON has no single root?
XML needs exactly one root element. If your JSON is an array, a scalar, or an object with several top-level keys, the converter automatically wraps it in a <root> element so the output is always well-formed.
Why does it warn about invalid XML?
Some JSON keys aren’t legal XML element names — for example "first name" (has a space) or "123" (starts with a digit). The converter shows the result and flags it so you can rename those keys.
Is my data uploaded?
No. Conversion runs entirely in your browser. Your JSON is never uploaded, logged, or stored.