Developer Tools

XML to JSON

Convert XML to JSON, keeping attributes and repeated tags as arrays.

Runs in your browser: nothing you enter is uploaded

Attributes

JSON

Converted in your browser. Nothing is uploaded.

How it works

1

Paste your XML

Paste XML or open an .xml file.

2

Choose attribute style

Show attributes as @id, _id or plain id.

3

Copy the JSON

Copy the result or download a .json file.

XML to JSON features

  • Keeps attributes with your choice of prefix.
  • Repeated tags become JSON arrays.
  • Text inside tags is kept, with #text when needed.
  • Clear error when the XML is not valid.
  • Works with RSS feeds, sitemaps and SOAP replies.
  • Private: nothing is uploaded.

XML to JSON FAQ

How do I convert XML to JSON?

Paste your XML above. The JSON appears on the right as you type.

What happens to attributes?

They become keys with your chosen prefix, like "@id": "b1".

Why are some tags arrays?

When a tag appears more than once in the same place, the values are grouped into an array.

Is my data uploaded?

No. The conversion runs in your browser.

Related Developer Tools

Recent from the blog