Skip to content
Private: files never leave your device

XML to JSON Converter

Convert XML into JSON that is easy to use in JavaScript and APIs. Attributes are kept, repeated elements become arrays, and numbers and true or false become real JSON values.

XML to JSON Converter tool

Attributes, arrays and real JSON types.

Handled on your device, so your files stay private.

XML to JSON Converter at a glance

Turn XML into clean JSON, keeping attributes, repeated elements as arrays and numbers as real numbers. Works with RSS, sitemaps, SOAP and config files. Free.

Cost
Free to use, with no account, watermark or usage cap.
Privacy
Processing happens on your device; nothing is sent to our servers.
Devices
Up-to-date Chrome, Edge, Firefox or Safari on computers, Android phones and iPhones.
Last updated

Converting XML to JSON, step by step

  1. Paste XML or open an .xml file.
  2. Choose whether to keep attributes, convert types and always use arrays.
  3. Pick the indentation, or minify.
  4. Copy or download the JSON.

How the conversion works

  • Each element becomes a key, and its text becomes the value.
  • Attributes get an @ in front of their name, such as @id.
  • Elements that repeat become an array.
  • Mixed text next to child elements is kept under #text.

Your data stays private

Many online text tools send what you paste to a server. These run entirely in your browser, so drafts, code, passwords and customer data never leave your device, and nothing is saved.

Frequently asked questions

Why is one element an object and another an array?

Elements that appear once become objects and repeated ones become arrays. Tick Always use arrays for a consistent shape.

What if my XML is invalid?

The error from the parser is shown. Check it with the XML Formatter to find the exact line.

Is my text uploaded?

No. Everything runs in your browser on your own device. Nothing you type is sent, logged or saved.