How to use XML to JSON
- 1. Paste XML. Well-formed XML only. HTML soup may fail.
- 2. Read JSON. This page is XML → JSON, not the reverse.
- 3. Optional XPath. Pull text from nodes without writing a script.
About this tool
“XML to json” is still a daily job for SOAP leftovers and vendor feeds. This page is that direction of the XML converter. The reverse (JSON to XML) has its own URL so each query gets a matching H1.
Attributes and arrays
Repeated child tags become arrays. A single child stays an object. That difference surprises people automating a feed — pin a fixture.
XPath stays on XML
The XPath box queries the original XML, not the JSON. Use it to extract titles or ids without converting first.
Code examples
XPath
//book[@id='b1']/title