XML to JSON
Free online XML to JSON converter (and back). Preserves attributes, text nodes and arrays, with optional type inference — 100% local processing.
Convention: XML attributes become @_name keys (id="1" → "@_id": "1"), element text becomes #text, sibling elements sharing a tag name are merged into arrays. JSON-to-XML follows the same rules in reverse.
FAQ
Where do XML attributes go?
Attributes become @_name keys in JSON (id="1" → "@_id": "1"); element text becomes a #text key. Converting back to XML follows the same convention.
How are repeated tags handled?
Sibling elements sharing a tag name (e.g. multiple <book>) are merged into a JSON array automatically, and expanded back into repeated tags on the way out.
Are numbers and booleans converted?
Yes, optionally. "1934" becomes the number 1934 and "true" becomes boolean true (can be turned off); long numbers keep string form to avoid precision loss.
Is anything uploaded?
No. Conversion runs entirely in your browser using the built-in XML parser — content never touches a server.
