XML to JSON

Convert XML elements, attributes and repeated tags into JSON.

Stays on your device. Cleared automatically after 5 minutes.

About this tool

Convert XML into indented JSON. Attributes use @ prefixes, repeated tags become arrays and mixed text uses #text. Text values remain strings. Comments and original mixed-content ordering are not preserved; DTDs are rejected.

How to use XML to JSON

  1. Paste XML or choose an XML file.
  2. Select Convert to JSON to validate and convert the document.
  3. Download the indented JSON file.

Frequently asked questions

How are XML attributes represented?

An attribute named id becomes @id. Text alongside child elements is stored under #text.

What happens to repeated elements?

Sibling elements with the same tag name become an array. A single occurrence is stored as one value.

Does this preserve XML exactly?

No. Comments, processing instructions and mixed-content order are omitted. DTDs and entity declarations are rejected.

Related tools

PDF tools
Image tools
Video tools
File tools
Text tools
Utility tools
Vynuro Tools