Convert XML to JSON
Converts XML to JSON whilst retaining attributes and repeated elements.
Workspace · Convert XML to JSON
How to use it
Upload an .xml file or paste the XML.
Choose whether you want to include attributes and whether the JSON should be indented.
Convert, check the result and download the .json file.
Examples
SOAP response
Converts an XML response into a manageable JSON object.
Catalogue
Converts an XML catalogue containing repeated elements into a JSON array.
What you need to know
The XML must have a single root element. Attributes are prefixed with @, mixed text with child elements is stored in #text, and repeated elements are converted into arrays. The tool validates the document and displays an error if tags are not properly closed.
Frequently Asked Questions
Related tools
Other tools that can help with similar tasks.
Convert JSON to XML
Generates XML from JSON with a custom root and attributes.
XML Validator
Checks whether an XML file is well-formed and identifies errors.
Convert JSON to YAML
Converts a JSON file or text into YAML with two-space indentation.
