Back to Data & Conversion

Free XML to JSON Converter

Paste a well-formed XML document and convert it instantly into structured JSON.

About This Tool

Free XML to JSON converter online — paste any XML document and instantly get structured JSON output, with attributes and nested elements preserved. Useful for developers working with legacy XML APIs or SOAP responses who need to process the data as JSON, or for inspecting the structure of an XML file quickly. Handles nested tags, repeated elements (converted into arrays), and attribute values. Everything runs locally in your browser using the native DOM XML parser — nothing is uploaded to a server.

How to Use

  1. 1

    Paste your XML

    Paste a well-formed XML document into the input box.

  2. 2

    Convert

    Click Convert to parse the XML into structured JSON.

  3. 3

    Copy the JSON

    Copy the formatted JSON output to your clipboard.

Frequently Asked Questions

Are XML attributes included in the JSON output?+
Yes — element attributes are included in the resulting JSON object, typically prefixed (e.g. "@id") to distinguish them from child elements.
What happens with repeated sibling tags?+
Repeated sibling elements with the same tag name are converted into a JSON array so no data is lost.
Does it work with SOAP or legacy API responses?+
Yes — as long as the XML is well-formed, typical SOAP responses and legacy XML API payloads convert cleanly into JSON.

Related Tools

JSON to XML Converter

Try it free →

CSV to JSON Converter

Try it free →

JSON Formatter

Try it free →

YAML to JSON Converter

Try it free →