XML ↔ JSON Converter

Convert XML to JSON or JSON back to XML, toggling direction with a single button. XML attributes become @-prefixed keys following the widely-used convention, and nested elements and repeated siblings are handled correctly. Useful when your data is in one format but the tool or API you are working with expects the other.

All processing happens in your browser. No data is sent to any server.

Frequently Asked Questions

How are XML attributes handled in the JSON output?
Attributes are converted to keys prefixed with @, following the widely-used convention for XML-to-JSON conversion.
Can it convert in both directions?
Yes — toggle between XML→JSON and JSON→XML using the direction button.
Does it handle nested elements and arrays?
Yes — deeply nested XML structures and repeated sibling elements (converted to JSON arrays) are both handled correctly.

Related Tools