XML to JSON Converter
Paste XML on the left to turn it into JSON you can inspect, copy, and reuse.
Source
Free-form source input. Auto-detect tries JSON first, then XML, then YAML.
DOMParser is not defined
Result
Choose the target format for the converted output.
Route Notes
Convert XML into JSON while keeping the structure easy to inspect and reuse.
Attributes show up as @name fields, text shows up as _text, and the original root tag is kept in _rootName.
XML Conversion Notes
XML to JSON keeps key XML details visible instead of flattening everything away.
Attributes appear as @name, and direct text appears as _text.
The original XML root tag name is preserved as _rootName.
Text-only child elements stay object-shaped, so <note>hello</note> becomes { "_text": "hello" }.
JSON to XML output always uses a fixed <root> wrapper in this MVP.