JSON will appear here...

How to Use XML to JSON

  1. Paste your XML: Paste any XML document into the input box, or load the sample with the Example button.
  2. Click Convert to JSON: Press the Convert to JSON button. Attributes get @ prefixes and repeated tags become arrays.
  3. Copy the JSON: Copy the formatted JSON output for use in your application.

About XML to JSON

XML to JSON Converter parses XML documents and produces clean, readable JSON objects.

  • Attributes Support: XML attributes become JSON keys with an "@" prefix, like "@id".
  • Array Detection: Repeated sibling tags are grouped into JSON arrays automatically.
  • Mixed Content: Elements with both attributes and text keep their text under "#text".

Perfect for consuming RSS feeds, SOAP responses and legacy XML data in modern JavaScript applications.

Frequently Asked Questions

How are XML attributes converted?

Attributes become JSON keys prefixed with "@", like "@id" or "@type". Child text content is stored under "#text" when the element also has attributes.

How are repeated XML tags handled?

Repeated sibling tags are grouped into a JSON array automatically, preserving their order.

Is this tool free to use?

Yes — 100% free, no signup, and the conversion runs entirely in your browser for full privacy.

Rate XML to JSON

How useful was this tool? Your feedback helps us improve.

★ ★ ★ ★ ★
Be the first to rate this tool!

Related Tools