XML to JSON Converter screenshot

XML to JSON Converter

Convert XML to JSON in your browser. Paste XML, get JSON — real example, no upload, no signup.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What this xml to json converter does

This converter reads XML and writes JSON. The document is parsed into a value tree first, so nesting survives the conversion; The output is indented with two spaces and is valid JSON; nested objects are preserved exactly as parsed.

How to use it

XML to JSON Converter: paste the XML into the box above, and press Run to get the JSON below.

Worked example

Input:

<people>
  <person><name>Ada</name><role>engineer</role><years>7</years></person>
  <person><name>Linus</name><role>maintainer</role><years>32</years></person>
</people>

Output:

{
  "people": {
    "person": [
      {
        "name": "Ada",
        "role": "engineer",
        "years": "7"
      },
      {
        "name": "Linus",
        "role": "maintainer",
        "years": "32"
      }
    ]
  }
}

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads XML and returns JSON; reloading the page discards both.

This converter reads XML and writes JSON. The document is parsed into a value tree first, so nesting survives the conversion; The output is indented with two spaces and is valid JSON; nested objects are preserved exactly as parsed.

Convert XML to JSON in your browser. Paste XML, get JSON — real example, no upload, no signup.

How to use it

XML to JSON Converter: paste the XML into the box above, and press Run to get the JSON below.

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads XML and returns JSON; reloading the page discards both.

What to Expect

Best for

  • Converting XML to JSON when the data is already on screen.

What this tool keeps

  • Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.

Sample input

<people> <person><name>Ada</name><role>engineer</role><years>7</years></person> <person><name>Linus</name><role>maintainer</role><years>32</years></person> </people>

Sample output

{ "people": { "person": [ { "name": "Ada", "role": "engineer", "years": "7" }, { "name": "Linus", "role": "maintainer", "years": "32" } ] } }

Frequently asked questions

How do I use the xml to json converter?

XML to JSON Converter: paste the XML into the box above, and press Run to get the JSON below.

Is my input uploaded?

No. The text is parsed on this page with JavaScript and is never posted to a server.

Is there a size limit?

Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.