XML to JSON

Convert XML elements, attributes and text to JSON using a visible, predictable mapping.

Loading workspace…

Usage guide

Convert XML elements, attributes and text to JSON using a visible, predictable mapping.

  1. 01

    Paste data or read from a file.

  2. 02

    Review the options; results update automatically. Run manually for larger inputs, and check warnings before applying changes.

  3. 03

    Copy or download the result. Your original document stays unchanged until you apply it.

Reference specifications:XML · W3C XML 1.0

Example input

<users><user id="001"><name>Ada</name></user></users>

Frequently asked questions

Can I recover my documents after closing the page?

Documents are saved automatically in this browser and restored when you return. Closing a document with X deletes it. Browser cleanup can also remove saved work; download important results or export your workspace.

How are XML attributes and text represented?

Attributes use keys prefixed with @_, and text uses #text. Formatting-only whitespace may be removed.