BuildUtilities

XML to JSON Converter – Free Online Tool

Convert XML documents to JSON with configurable attribute handling.

✦ FreeNo SignupInstantDataData Interchange Formats Guide
Drop an XML file or click to upload
Ctrl+ENTERConvert

Example

Input

<user id="1"><name>Alice</name></user>

Output

{"user":{"@id":"1","name":"Alice"}}

The XML element becomes a JSON object. Attributes are prefixed with @ and child elements become properties.

How to Use XML to JSON Converter

  1. 1

    Paste XML

    Paste your XML content or upload an .xml file.

  2. 2

    Configure Options

    Choose the attribute prefix (@, _, or none).

  3. 3

    Convert & Export

    Click Convert and download or copy the JSON result.

What is XML to JSON Converter?

The XML to JSON Converter uses the browser's native DOMParser for accurate XML parsing and converts the document tree to a JSON structure. Repeated elements become arrays automatically, text nodes are preserved, and attributes are distinguished with a configurable prefix.

Common Use Cases

  • Converting SOAP API responses to JSON for modern applications
  • Transforming RSS/Atom feeds into JSON for web apps
  • Migrating legacy XML data formats to JSON

Share

Share a link to this tool. Results can be passed via URL parameters.

https://buildutilities.com/share/xml-to-json

Frequently Asked Questions

More Data Tools

Tools for working with structured data formats like JSON, CSV, YAML, and XML.

View all Data tools
Tip Jar