XML to JSON Converter

Input XML
Use Sample
Output JSON

About XML to JSON

Paste XML on the left to get pretty-printed JSON on the right. Conversion runs as you type. Use Sample for a starter document, then Copy or Download the JSON.

Attributes are typically mapped with an underscore prefix (for example id="1"_id), which matches the companion JSON to XML converter.

  • Invalid or incomplete XML clears the output and shows an error status until it parses again.
  • Explore the result visually with the JSON Tree Viewer.
  • Going the other way? Use JSON to XML.