Integration Studio Tools — sign up and run every tool. No credit card required.
converters · Integration Studio Tool

XML to JSON

Convert XML into JSON, attributes and text nodes included.

Your data never leaves your browser

This tool runs entirely on your computer. What you paste or drop is never uploaded, never stored and never seen by us — close the tab and it's gone. How we know

Sign up to run — no credit card required.

Press Run to see the output. Sign up takes ten seconds — no credit card required.

Worked example

Input
<a><b>1</b></a>
Output
{
  "a": {
    "b": "1"
  }
}

This example is one of XML to JSON's test cases — if the tool stopped producing this output, the build would fail.

Questions

How do I tell attributes from elements in the output?
Attributes carry an @_ prefix; an element's own text sits under #text. Nothing is silently merged, so you never lose the distinction.
Are numbers converted?
No — values stay strings. SAP data is full of leading zeros and fixed decimals that JavaScript would quietly destroy by parsing (0012340 becoming 12340). Keeping strings is the safe default.

Related tools