Skip to main content

XML to JSON Converter

Convert XML documents into clean, readable JSON.

What does this tool do?

Direct answerXML to JSON Converter maps elements to keys, attributes to @-prefixed keys, and repeated sibling elements to arrays.
Key factXML attributes become "@name" keys in the JSON output; text-only elements become plain strings.
ProcessingRuns locally in your browser; no data is sent to a server.

How to use

  1. Paste XML into the input.
  2. Click Convert to JSON.
  3. Copy or download the JSON output.

Who is this for?

This tool was built for people who need a fast answer in the browser — no install, no account, no data leaving the device.

Developers formatting API responses or config files, analysts inspecting minified payloads, and students learning structured data formats. If you have ever squinted at a one-line blob hoping to find a missing brace, this page is for you.

Frequently asked questions

How are XML attributes represented?

As keys prefixed with @ — for example id="7" becomes "@id": "7".

What about repeated elements?

Sibling elements with the same tag name become a JSON array of values.

Does it handle CDATA and entities?

Yes — CDATA sections become text content and standard entities (& < > …) are decoded.

More tools in this category