XMLJSON
XML to JSON Converter
Convert XML documents to JSON format instantly. Preserves element hierarchy, attributes (prefixed with @_), and text content. Perfect for migrating from XML-based APIs to modern JSON APIs or working with legacy SOAP services.
How It Works
- Paste XML in the left editor
- JSON output appears instantly in the right panel
- Attributes are preserved with @_ prefix
- Nested elements become nested JSON objects
Frequently Asked Questions
How are XML attributes handled?
XML attributes are preserved in the JSON output with an @_ prefix. For example, <book id="1"> becomes {"@_id": 1, ...}.
What about CDATA sections?
CDATA sections are extracted as plain text values in the JSON output. The CDATA wrapper is removed and the content is preserved.
Can I convert SOAP responses?
Yes. Paste the full SOAP XML response and the converter will produce a JSON representation of the entire document, including envelope and body elements.