XML ↔ JSON
How to use this XML/JSON converter
- Choose the direction: "XML → JSON" or "JSON → XML".
- Paste your source data into the left box.
- The converted result appears on the right instantly.
Why convert between XML and JSON?
XML is still common in legacy enterprise systems, SOAP APIs, and configuration files, while JSON is the standard for modern web APIs. This converter helps integrate old and new systems without manually rewriting data structures by hand.
How are XML attributes represented in JSON?
Attributes are placed under an "@attributes" key, and the tag's own text content (if any) under "#text", following a common convention for lossless XML-to-JSON conversion.
Does this handle deeply nested XML?
Yes, the converter recursively processes child elements at any depth, and repeated sibling tags are automatically grouped into arrays.