Follow Us

XML to JSON Converter

Turn any XML — API responses, RSS feeds, sitemaps or config files — into clean, readable JSON. Attributes, repeated tags and text are all handled.

JSON Output
JSON to XML

Runs in your browser — your code is never uploaded. Tip: drop a file on the input box, or press Ctrl + Enter.

How to Convert XML to JSON

Three steps from XML to JSON.

1

Paste or Upload XML

Paste XML or upload an .xml, RSS, SVG, KML or GPX file.

2

Choose Options

Convert numbers and true/false, pick the attribute prefix, or always use arrays.

3

Copy or Download

Copy the JSON or download data.json.

Attributes

@ prefix (or _ / -)

Repeated tags

Become arrays

Errors

Bad XML is reported

Privacy

Runs in your browser

Works on

Phone & computer

Price

100% free

How XML Maps to JSON

The rules used — the same ones our JSON to XML converter reads back.

XMLJSON
<name>Asha</name>"name": "Asha"
<book id="b1">"@id": "b1"
<tag>1</tag><tag>2</tag>"tag": [1, 2]
<price currency="USD">9.5</price>"price": {"@currency": "USD", "#text": 9.5}
<![CDATA[ … ]]>Plain text
<empty/>"empty": ""

What Can You Use It For?

Popular ways people use XML to JSON Converter.

RSS & Atom Feeds

Read blog and podcast feeds as JSON in your app.

SOAP & Old APIs

Convert XML responses for modern JavaScript code.

Sitemaps

Inspect sitemap.xml URLs as JSON data.

GPX & KML

Turn GPS tracks and map data into JSON.

Tips for the Best Result

  • Turn on Always use arrays if your code needs the same shape whether there is one item or many.
  • Untick Convert numbers to keep values like zip codes (00123) as text.
  • Comments and processing instructions are ignored; CDATA becomes normal text.
  • Convert back with JSON to XML.

Frequently Asked Questions

Quick answers about XML to JSON Converter.

Paste your XML or upload a file. The JSON appears instantly — copy it or download data.json.

Attributes become keys with a prefix, by default @ — so id="b1" becomes "@id": "b1". You can switch to _ or -.

Elements with the same name become a JSON array. Tick Always use arrays to make every child an array.

When an element has both attributes and text, the text is stored under the #text key.

XML must be well-formed: every tag closed, one root element, and & written as &amp;. The message shows the line of the error.

Yes — any well-formed XML, including RSS, Atom, SVG, KML, GPX and sitemap.xml.

No. Everything runs in your web browser, so your code and data never leave your device.

Yes — 100% free, with no sign-up and no limits.

Related Free Tools

Ready to Use XML to JSON Converter?

Scroll up and get your result in seconds. 100% free, no sign-up needed.

Start Now

Ad Blocker Detected

Toolszu provides free access to over 1,000 tools. We rely on minimal ads to maintain our servers and keep improving the site for everyone.

Please pause or disable your ad blocker to continue using Toolszu.