Convert XML to JSON or JSON to XML
Paste XML markup to get a clean JSON representation, or paste a JSON object to get back valid XML. Element attributes are preserved as keys prefixed with @, and repeated sibling elements become JSON arrays automatically.
How to use it
- Choose XML → JSON or JSON → XML.
- Paste your data into the input box.
- Press Convert, then copy the result.
Why convert between XML and JSON
Many older APIs, RSS feeds and enterprise systems still exchange data as XML, while modern web apps and JavaScript work natively with JSON. Converting XML responses to JSON makes them easy to use in code, while converting JSON back to XML is handy for feeding legacy systems that expect it.
Common uses
- Converting an RSS/Atom feed or SOAP response into JSON for a script
- Preparing JSON config data as XML for a legacy system
- Inspecting XML data in a more readable JSON structure
- Testing API integrations that expect XML input
Frequently asked questions
How are XML attributes represented in JSON?
Attributes become JSON keys prefixed with @, e.g. <item id="1"> becomes {"@id":"1"}.
What JSON structure is expected for JSON to XML?
A JSON object with a single top-level key, which becomes the XML root element.
Is my data uploaded anywhere?
No, all conversion happens locally in your browser using the browser's built-in XML parser.