XML to JSON Converter

Convert XML to JSON and back, fast for APIs and config files, so you can use data structures flexibly for different applications. GDPR-compliant.

The result will appear here …

How to use this tool (video)

This video is hosted on YouTube. When you play it, data may be sent to Google.

XML to JSON Converter

The XML to JSON converter transforms XML documents into JSON and back. This is handy when you work with APIs, align configuration, or transfer data between systems. Attributes are kept with an @ prefix, and repeated elements become JSON arrays.

How the conversion works

  • XML to JSON: elements become objects, attributes become @ keys, text content is mapped accordingly.
  • JSON to XML: objects become nested elements, @ keys become attributes, lists become repeated elements.

The tool uses the browser's native XML parser. After loading, the conversion runs right in your browser and your data is not transmitted to our servers.

Frequently asked questions

How do I convert XML to JSON?

Paste your XML document and choose convert. Elements become objects, attributes become @ keys and repeated elements become JSON arrays.

How do I convert JSON back to XML?

Paste your JSON and choose the reverse direction. Objects become nested elements, @ keys become attributes and lists become repeated elements.

Why do @ characters appear in the keys?

Attributes of an XML element are taken over as JSON keys with an @ prefix so they can be distinguished from normal elements. When converting back, these @ keys become attributes again.

How are repeated elements handled?

Repeated elements are automatically combined into JSON arrays. This way the structure of an XML document is preserved during conversion.

Does the tool work offline?

Yes. The tool uses your browser's native XML parser. After loading the page, the conversion runs right in your browser and your data is not transmitted to our servers.