Convert XML to JSON.
Convert XML into clean JSON — attributes, text and nesting preserved so it round-trips back to valid XML.
XML to JSON, with attributes preserved
XML still powers RSS feeds, sitemaps, SOAP responses and plenty of legacy config. Converting it to JSON drops it straight into modern tooling — fetch, jq, JavaScript and document databases all speak JSON natively.
How elements map
Each element becomes a key; nested elements nest; and when a tag repeats, those siblings become a JSON array. Attributes aren't thrown away — they're kept as keys prefixed with @_ (so <item id="1"> becomes "@_id": "1"), which means the result round-trips back to equivalent XML.
Worth knowing
Whitespace-only text between tags is ignored, and an element that holds both text and child elements (mixed content) is uncommon in data XML but flattens to a node with both a text value and child keys. For clean data-style XML, the mapping is lossless.
How it works
- 01
Choose your XML
Drop a file or pick one from your device. Private by default.
- 02
Convert losslessly
XML elements, attributes and text become JSON right in your browser — nothing uploaded.
- 03
Download
Grab your JSON.
Lossless, structure-preserving conversion
Converts in your browser — never uploaded
No watermark, no signup to try
Handles large files
Free and open-source engine
XML to JSON
XML and JSON are structured-data formats. This parses your XML and re-serialises the same data as valid JSON, entirely in your browser — nothing is uploaded. Key order and whitespace may be normalised; the data itself is preserved.
Common questions
Is it free?+
Yes — convert XML to JSON free. No signup, no watermark, no daily cap.
Is my data private?+
It runs entirely in your browser — your file never leaves your device or touches our servers.
Is the conversion accurate?+
Yes — we use a faithful, lossless engine. Keys, values and nesting are preserved so the output round-trips back to your source.
Related conversions