100% local — your data never leaves your browser

XML to JSON Converter — Free Online Tool

Convert XML to JSON instantly in your browser. Free, private and offline-friendly: your documents never leave your device.

Instant Private Zero cookies
Indentation

XML input

JSON output

Why convert XML to JSON?

Legacy APIs, RSS feeds, sitemaps and configuration files still speak XML, while modern tooling expects JSON. Paste an XML document above and get an equivalent JSON tree you can inspect, query or feed into your code.

How it works

The document is validated first — malformed XML is rejected with an error — then parsed locally. Attributes are preserved with an ”@_” prefix, repeated elements become arrays, and numeric text values are typed as numbers.

Frequently asked questions

Is my XML data uploaded to a server?
No. The conversion runs entirely in your browser with JavaScript. Nothing is sent over the network, which makes the tool safe for sensitive data.
How are XML attributes represented in JSON?
Attributes are kept and prefixed with "@_", a widely used convention. For example <book id="7"> becomes {"book": {"@_id": "7"}}.
What about repeated elements and CDATA sections?
Repeated sibling elements are grouped into a JSON array, and CDATA content is extracted as plain text, so the structure of your document is preserved.

Related converters