๐Ÿ”„

Free XML to JSON Converter

Convert XML data to JSON format

Indent:

Paste XML above to convert to JSON

How to Use

  1. 1

    Paste your XML into the input area.

  2. 2

    Choose your preferred indentation (2 or 4 spaces).

  3. 3

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

Frequently Asked Questions

When would I need XML to JSON conversion? โ–ผ
XML to JSON is common when working with REST APIs that need JSON, processing RSS/Atom feeds, migrating data from legacy SOAP services to modern APIs, or simplifying XML data structures for JavaScript apps.
How are XML attributes handled? โ–ผ
XML attributes are prefixed with @ in the JSON output (e.g., @id, @class). Text content of elements is stored under the #text key when the element also has attributes or child elements.