XML to JSON
Convert XML into JSON with attributes and repeated elements handled sensibly.
Input
Result
How to use
Converting XML to JSON
Press Convert to obtain a JSON representation. Attributes use the at sign prefix.
- Paste XML into the input editor.
- Press Convert.
- Copy the JSON output.
Frequently asked questions
How are attributes represented?
Each attribute becomes a property named with an at sign, for example at id.
How are repeated elements handled?
When the same tag appears more than once at one level the values are collected into an array.
Related tools
JSON to XML
Convert a JSON document into well formed XML with a configurable root element.
XML Formatter
Pretty print XML with consistent indentation and optional attribute wrapping.
YAML to JSON
Convert YAML documents into JSON for APIs and JavaScript applications.
YAML Formatter
Parse and re-serialise YAML with consistent indentation and validation.
YAML Validator
Validate YAML syntax and get a precise error when indentation or structure is wrong.
XML Validator
Check that an XML document is well formed and see a clear error description.