Skip to content
Web4tools

XML to JSON Converter

Turn XML feeds, sitemaps and API responses into JSON.

Runs in your browserNo accountNo watermark

In short

To convert XML to JSON, paste the XML and copy the JSON. Attributes are kept with an @ prefix, repeated elements become arrays, and the XML is validated first so you get a clear error with a line number if it's malformed.

How to use the XML to JSON Converter

  1. 1Paste or type your input in the left box (or click "Try an example").
  2. 2Adjust the options if needed. The result updates as you type.
  3. 3Copy the result or download it as a file.

Handy for legacy APIs

Many older APIs, RSS feeds and enterprise systems still speak XML. Converting to JSON makes the data easy to use in JavaScript and modern tooling.

Frequently asked questions

How are attributes shown?

As keys starting with @, e.g. <book id="1"> becomes {"@id": "1"}.

Are namespaces supported?

Namespace prefixes are kept as part of the key names.

Is my data sent anywhere?

No. Everything runs in your browser. What you paste is never uploaded, logged or stored, so it's safe for code, tokens and private content.

Last updated