XML → JSON Converter

Turn XML documents into structured JSON — offline.

Your data is processed entirely in your browser and is never uploaded.

Tool workspace

INPUT XML

Drag & drop file here or browse

XML Status: Empty0 chars

Options

Keeps repeated elements as arrays. Turn off to collapse to the last value.

Local sandbox active
OUTPUT JSON
Output: Empty0 chars
HOW IT WORKS

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.

FAQ

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.