XML to JSON Converter
Convert XML documents to structured JSON and back.
Files and text are processed locally in your browser. Tools that must reach the network say so explicitly.
About the XML to JSON Converter
Convert XML to JSON and JSON back to XML. The Toolcenter converter parses XML with the browser’s DOM, preserves attributes under an @attributes key, collapses repeated elements into arrays, and can regenerate indented XML from JSON. Useful for API payloads, configs and feeds.
How to use it
- 1Choose XML → JSON or JSON → XML.
- 2Paste your document.
- 3Toggle attribute handling for XML input.
- 4Copy or download the converted output.
Key features
- Two-way XML ↔ JSON conversion
- Attributes preserved under @attributes
- Repeated tags become arrays
- Pretty-printed output
- Parses locally with no upload
Frequently asked questions
How are XML attributes represented?+
Each element’s attributes are placed in an @attributes object, and its text content in a #text field when both are present.
What happens with repeated elements?+
Two or more sibling elements with the same tag become a JSON array automatically.
Can it convert JSON back to valid XML?+
Yes, with a single root key. The output is indented and escapes special characters.
Is my document uploaded?+
No. Parsing uses the browser’s built-in XML parser.
Also searched as
Related converters
Unit Converter
Length, mass, area, volume, speed, temperature, data and more.
Currency Converter
Convert between 150+ currencies with editable offline rates.
Time Zone Converter
Compare a moment across cities and build a meeting planner.
CSV to JSON Converter
Parse delimited data to JSON with header and type detection.
JSON to CSV Converter
Flatten JSON arrays/objects into a downloadable CSV.
Markdown to HTML Converter
Render Markdown to clean HTML with a live split preview.