Skip to content

Tools/XML ↔ JSON/XML to JSON

XML to JSON

Paste XML on the left and read JSON on the right. This URL is the XML → JSON direction. Attributes and text nodes follow the converter’s mapping — check a sample before you automate it.

Same converter: all directions · JSON to XML

Loading tool…

How to use XML to JSON

  1. 1. Paste XML. Well-formed XML only. HTML soup may fail.
  2. 2. Read JSON. This page is XML → JSON, not the reverse.
  3. 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

This is one direction of the shared converter. The editor is the same; the title and default direction match this search.

Frequently asked questions

Related tools

All tools