Turn XML into JSON

Drop an XML file into the page. The tool walks the tree and keeps every attribute. The result is ready to use in any app.

Stays on your device Free
1. Add the XML file

An XML file, or paste its text.

Local only
Drop an XML file here, or click to choose .xml, up to 10 MB
JSON
Output
Add an XML file to begin.
JSON ready

This runs in your browser. Your file is not sent to us.

How to use xml to json

  1. Add the XML. Drop an XML file into the page.
  2. Pick the output. Choose indented or compact JSON.
  3. Download the JSON. Save or copy the JSON the tool builds.

What you get

  • Attributes sit in an @attributes object
  • Repeated elements become JSON arrays
  • Text nodes become values
  • Indented or compact output
  • No upload and no sign up

Why this runs in your browser

Most free PDF sites ask you to upload your file. Then you wait. Then you hope they delete their copy. That is a bad deal for a payslip, a contract or a passport scan.

XML to JSON reads the file on your device and saves the result to your downloads folder. There is no upload and no copy on a server. For the details, see how it works.

XML to JSON questions

How are attributes handled?

Attributes sit in an @attributes object inside each element.

How are repeated elements handled?

Repeated siblings become a JSON array under the same key.

What about empty elements?

Empty elements become empty objects in the JSON.

Is my XML uploaded?

No. The parse happens on your device and never leaves the browser.