Skip to content
TheFilesGuy
en
Menu

.xml → .json

XML to JSON Converter

Turn XML data, feeds and exports into JSON you can use in code.

Files never leave your device.

Processed on this device. Nothing is uploaded.

About XML to JSON

XML still powers RSS feeds, sitemaps, invoices, bank exports, SOAP APIs and configuration files, but most modern code is happier with JSON. Paste XML or open a file, and it's converted as you type: elements become keys, repeated elements become arrays, attributes become keys starting with @, and text in elements with attributes is kept as #text. You can drop attributes for simpler output, and turn numbers and true or false into real JSON values. Malformed XML is reported clearly.

How to Use It

  1. 01

    Paste or open

    Paste XML into the left box, or open an .xml file.

  2. 02

    Choose options

    Keep or drop attributes, detect numbers, and pick the indentation.

  3. 03

    Copy or download

    Copy the JSON, or download it as a .json file.

Questions

How are attributes converted?

As keys starting with @, for example <book id="1"> becomes "@id": "1". Untick Keep attributes to leave them out.

Why are some elements arrays and others not?

Elements that appear more than once under the same parent become arrays; single elements stay as plain values.

Are namespaces supported?

Yes. Prefixed names such as dc:title are kept as they are in the JSON keys.

Is my data uploaded?

No. The XML is parsed in your browser.

See all data tools

Learn More