XML ↔ JSON Converter

Convert between XML and JSON with attribute and nesting support.

Input (XML)
Output (JSON)

Paste XML to convert…

Conversion Details

XML → JSON

Converts XML elements to JSON objects, attributes to @ prefixed keys, and handles text nodes, nested elements, and arrays.

JSON → XML

Converts JSON objects to XML elements, @ prefixed keys to attributes, with proper escaping and XML declaration header.

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