XML to JSON Converter
Paste XML and convert it into readable JSON with attributes and repeated nodes preserved.
Paste XML into the input box, then select Convert to JSON. The output is formatted with two-space indentation for easy reading.
Use the copy or download controls when you want to move the result into an editor, API client, or documentation.
An XML element like <price currency="USD">19.99</price> becomes a JSON object with an @attributes property and a #text value.
How are XML attributes handled?
Attributes are placed under an @attributes object so they remain separate from child elements and text values.
How are repeated XML elements handled?
Repeated sibling elements with the same name are converted into arrays in the JSON output.
Can this convert large XML files?
It is best for small and medium snippets that fit comfortably in the browser. Very large XML files may be slow depending on your device.
Is my XML uploaded?
No. XML parsing and JSON formatting happen locally in your browser.