XML ⇄ JSON Converter
Bidirectional XML and JSON conversion with attribute-aware mapping.
Direction
DOMParser is not defined
What is this tool?
XML and JSON are both common interchange formats. This converter maps XML attributes to keys prefixed with @, repeated sibling elements to arrays, and text nodes to #text when mixed with children. The reverse direction expects a single root object key.
How to use it
- Choose XML → JSON or JSON → XML.
- Paste input in the selected format.
- Copy the converted output. For JSON → XML, use one top-level key as the root element.
Related conversions tools
- .env ⇄ JSON ConverterConvert dotenv key/value files to JSON objects and back.
- JSON to C# ConverterGenerate C# class definitions from sample JSON.
- JSON to TypeScript ConverterGenerate TypeScript interfaces or types from JSON.
- JSON to Python DataclassGenerate Python dataclasses or Pydantic models from JSON.