Sign in

File tools that never upload your files

Convert XML to JSON

Work with an XML feed, an invoice or a configuration file in modern tools by converting it to JSON. The element structure is kept, attributes included. Everything runs in your browser, so the XML stays on your device.

5 free data and file results; text tools such as the JSON formatter never count. Paid plans have no usage limits.

How it works

  1. 1

    Paste the XML

    Paste it or choose an .xml file.

  2. 2

    Read the JSON

    The JSON appears indented and readable.

  3. 3

    Copy or download

    Copy it or save it as a .json file.

Why work without uploading

Structure kept

Elements nest the same way in JSON as in the XML.

Attributes included

Each attribute becomes a key starting with @, such as @id.

Private

Feeds and documents are converted on your device.

Good to know

Elements become objects, repeated elements with the same name become arrays, and text inside an element that also has attributes is stored under #text. Values are kept as text, exactly as written, so numbers with leading zeros and codes are not changed.

The XML declaration is dropped because it has no meaning in JSON. Comments are not kept. Invalid XML is reported instead of producing a half-finished result.

To get a table instead of nested JSON — for example the orders in an order feed — use XML to CSV or XML to Excel, which turn the repeated records into rows.

Questions and answers

How are attributes shown?

As keys starting with @, for example @currency.

Are numbers converted?

No. Values stay text exactly as they are in the XML.

Is my XML uploaded?

No. It is converted in your browser.

Can I convert large XML files?

Yes, within the memory of your browser; very large files take a moment and phones handle smaller files than computers.