XML to JSON

Convert XML into structured JSON with attributes and arrays.


    

ToolsSoup's XML to JSON converter is a free online tool that turns XML into clean, structured JSON. Element names become keys, attributes are prefixed with @, repeated tags become arrays, and text content is preserved. Everything runs in your browser — no uploads, no sign-up, and nothing ever leaves your device.

What is an XML to JSON converter?

An XML to JSON converter rewrites XML — a tag-based format — as JSON, the format that JavaScript and modern APIs prefer. Each element becomes a key, its attributes are kept with an @ prefix, and elements that repeat under the same parent become an array. It is the quickest way to bring legacy XML, a SOAP response, or an RSS feed into a codebase that works with JSON.

How to convert XML to JSON online

Converting XML with ToolsSoup takes just a few seconds:

  1. Paste your XML into the input box on the left.
  2. Choose whether to parse numbers and booleans into real JSON types.
  3. Click Convert, then copy the JSON.

How are attributes and repeated elements handled?

Attributes are stored as keys prefixed with @, so an id attribute becomes @id. When an element appears more than once under the same parent, those elements are collected into an array. If an element has both attributes and text, the text is kept under a #text key. This keeps the JSON predictable and easy to work with.

Why use this XML to JSON converter?

  • 100% free with no ads, sign-up, or usage limits.
  • Runs entirely in your browser — your data is never uploaded to a server.
  • Keeps attributes with an @ prefix.
  • Turns repeated elements into arrays.
  • Optional number and boolean parsing.

Frequently asked questions

Is this XML to JSON converter free?

Yes. Every tool on ToolsSoup is completely free to use, with no account, sign-up, or hidden limits.

How are XML attributes represented in JSON?

Attributes become object keys prefixed with @. For example, an element with an id attribute produces a key called @id alongside the element's other content.

What happens to repeated tags?

When the same tag appears multiple times under one parent, the converter collects them into a JSON array so no data is lost.

Why do some values have a #text key?

When an element has both attributes and text content, the text is stored under a #text key so it sits alongside the attributes without conflict.

Is my data safe?

Absolutely. All conversion happens locally in your browser using JavaScript, so your XML is never sent to or stored on any server.