ConvertPure

XML to JSON

Paste or drop an XML file
JSON output
// Parsed JSON appears here instantly...

How it works

01

Load or paste any XML

Drop .xml, .rss, .atom, or ERP feed files up to 15 MB, or paste XML straight into the left pane.

02

Control attributes & arrays

Choose whether to preserve @attributes, simplify single-element arrays, trim whitespace, or minify JSON.

03

Copy or download JSON

Review node counts and formatted JSON side by side, then copy or download .json in one click.

XML Construct to JSON Mapping Guide

Predictable deterministic output for ERP feeds, invoices, RSS/Atom, and SOAP payloads.

XML Construct JSON Output (Default) Configurable Option
Attributes (<acct id="101">) { "@attributes": { "id": "101" } } Toggle "@attributes"
Repeated siblings (<item> x3) { "item": [ ... ] } Always emitted as JSON array
Single child (<name>Ops</name>) { "name": "Ops" } Uncheck "Simplify arrays" for 1-item array
CDATA & Entities (&amp;) Decoded UTF-8 string value Toggle "Trim text"

Frequently asked questions

How are XML attributes represented in the JSON output?

When "@attributes" is enabled, element attributes are grouped cleanly under an @attributes object key. Uncheck it if you only want child element data.

What does "Simplify arrays" do?

Repeated sibling tags (such as multiple <transaction> nodes) always become a JSON array. Enabling simplify turns single-occurrence tags into direct objects/values instead of 1-item arrays.

Does the parser handle CDATA blocks and XML entities like &amp;?

Yes. Our pure TypeScript XML parser decodes named entities (&amp;, &lt;, &gt;, &quot;, &apos;), numeric character references, and <![CDATA[...]]> blocks consistently across all browsers.

Will mismatched or unclosed XML tags show where the error is?

Yes. Any mismatched closing tag, unclosed element, or malformed attribute reports the exact 1-based line and column number.