Convert XML data to JSON format instantly.
XML to JSON Converter turns an XML document into JSON. Repeated elements become arrays, attributes are prefixed with @, and text next to attributes or children is stored as #text. You can keep values as strings or convert numbers and booleans.
Made for developers. Typical uses:
XML and JSON model data differently, so the mapping follows common conventions rather than a single standard. The original element order between different tag names is not preserved.
Accuracy: Output is tested against known inputs. For production code, review the result and run your own tests.
Why JSON that looks fine still fails to parse: trailing commas, single quotes, comments, NaN and oversized numbers, and how to validate, format and compare it fast.
Explore more in Developer Tools, read the guides and articles, or see how we test our tools.
Format and beautify XML data with proper indentation.
Best for making a minified API response readable before debugging it
Format, beautify, and validate JSON data with proper indentation.
Best for formatting minified JSON from APIs for readability
Validate JSON syntax and check for errors.
Best for validating JSON before API deployment
Minify XML data by removing whitespace and comments.
Best for shrinking an XML API response before storing it in a database column