XML → JSON Converter
Turn XML documents into structured JSON — offline.
Your data is processed entirely in your browser and is never uploaded.
Tool workspace
Drag & drop file here or browse
Options
Keeps repeated elements as arrays. Turn off to collapse to the last value.
Convert XML to JSON in three steps
Paste or upload
Drop in any XML — RSS, SVG, configs, or API responses.
Configure output
Choose whether to include attributes, preserve arrays, and set indentation.
Convert & export
Click Convert, then copy or download the resulting JSON — all offline.
Frequently asked questions
Is my XML uploaded anywhere?
No. Conversion runs entirely in your browser (in a background worker). Your data never leaves your machine.
How are XML attributes handled?
Attributes are prefixed with @ in the JSON output (e.g., "@id": "1"). You can toggle them on/off.
What about CDATA and comments?
CDATA is treated as text. Comments, processing instructions, and DOCTYPE declarations are skipped for clean output.
Why are arrays sometimes single objects?
If "Preserve arrays" is off, a single child becomes an object. Turn it on to always get arrays for repeated tags.