Skip to content

XML to JSON Converter

Data & CSV · Done in 3 steps

Stays on your deviceFree · No sign-up
  1. 1Paste your XML
  2. 2
  3. 3
Loading tool…

About

Convert XML to JSON in your browser with attribute prefix, text-node key, value typing and always-array options, plus clear error locations.

How to use it

  1. 1Paste XML or drop an .xml file.
  2. 2Set the attribute prefix (default @_) or ignore attributes.
  3. 3Choose whether to convert numbers/booleans and always wrap elements in arrays.
  4. 4Copy or download the JSON.
You give
Well-formed XML (RSS, sitemaps, SOAP, config files…)
You get
JSON
Good to know
DTDs and external entities are not loaded. Mixed content (text interleaved with elements) is simplified. Namespaces are kept as part of tag names (e.g. dc:title).
Privacy
Processed on your device. Nothing is uploaded, stored or logged.
Last tested
2026-10-28

FAQ

Why does one element become an object and two become an array?

That’s the natural mapping of repeated elements. If your code needs a consistent shape, tick “Always use arrays”.

Where do attributes go?

Attributes become keys with the prefix you choose, e.g. id="1" → "@_id": 1. Element text next to attributes goes under the text key (#text).

Go further with AI