XML to JSON Converter
This XML to JSON converter parses any XML document into equivalent JSON. Attributes are captured as object keys under a configurable prefix ("@_" by default), text content becomes plain string values, and repeated sibling tags automatically become JSON arrays. Namespace prefixes in tag names are preserved, and everything runs locally in your browser with no upload.
Frequently asked questions
How do I convert XML to JSON?
Paste your XML into the editor and the JSON equivalent is generated automatically, ready to copy or download.
How are XML attributes represented in the JSON output?
Attributes appear as object keys prefixed with "@_" inside each element’s object — for example, an id attribute becomes the key "@_id" — and you can change that prefix in the options panel.
What happens to repeated XML tags?
When a parent element contains multiple children with the same tag name, those children are converted into a JSON array instead of overwriting each other.
Does this tool support XML namespaces?
Yes. Namespace prefixes in element and attribute names are kept intact in the resulting JSON keys rather than being stripped out.
Is my XML file uploaded anywhere when I convert it?
No. Parsing happens entirely client-side in your browser, so the XML content never leaves your device.