Skip to main content
Filesvo

Convert XML to JSON

Paste XML or upload an .xml file and get pretty-printed JSON that mirrors the document's structure. The XML is parsed by your browser's own XML engine, so malformed input is reported with the parser's actual complaint instead of silently producing wrong output. Nothing is uploaded to Filesvo.

…or paste directly into the box above

Processed on your device — files are never uploaded to Filesvo.

How to use Filesvo

  1. Paste your XML into the box, or upload an .xml file.
  2. Click Convert to JSON.
  3. Copy the result or download it as a .json file.

The mapping convention

XML and JSON are not the same shape — XML has attributes, mixed text and repeatable elements, which JSON lacks — so every converter must pick a convention. Filesvo uses a common, predictable one: each element becomes an object; its attributes go under "@attributes"; child elements become keys, and when the same tag repeats, those siblings become an array; text alongside child elements goes under "#text"; and an element containing only text collapses to a plain string.

This convention keeps the output readable and is easy to work with in code, but note the repeated-tag rule: an element that happens to appear once becomes a single value, not a one-item array. If your code expects arrays, normalize after parsing.

Transparency handling

XML→JSON has no single standard mapping — the convention used here ("@attributes", "#text", repeated tags → arrays) is documented above so the output is never a surprise.

Private by design

Your files are processed directly in your browser using open-source engines that run in your browser and are not uploaded to Filesvo. Nothing is stored on our servers, because nothing ever reaches them.

Frequently asked questions

Where do XML attributes end up?
Under an "@attributes" key on the element's object — for example <person id="1"> becomes {"@attributes": {"id": "1"}, …}.
Why is one element an object but the same element elsewhere an array?
Repeated sibling tags become an array; a tag appearing once stays a single value. The converter cannot know a tag is "supposed to" repeat when it only sees one — if your code expects arrays, wrap single values after parsing.
Are comments and the document declaration preserved?
No — JSON has no place for them, so comments and the <?xml …?> declaration are dropped. Element data, attributes and text are all preserved.
Is my data uploaded to a server?
No. Your browser's built-in XML parser does the work locally — your data never leaves your device.