Paste any XML document and instantly convert it to clean, readable JSON. Supports attributes, nested elements, repeated nodes, and mixed content — entirely in your browser.
XML and JSON are the two most widely used data interchange formats on the web, but they serve increasingly different audiences. XML was the default for APIs, configuration files, and data feeds through the 2000s, and countless enterprise systems still produce XML output today. JSON took over as the default for modern REST APIs, JavaScript applications, and NoSQL databases because of its lighter syntax and direct mapping to programming language objects. When you need to move data from an older XML source into a modern application, converting XML to JSON is the most practical first step.
This XML to JSON converter handles the most common patterns you'll encounter in real-world XML: simple key-value elements, attributes (prefixed with @ in the output), deeply nested structures, and repeated sibling nodes that automatically become JSON arrays. The conversion runs entirely in your browser using the native DOMParser API, so there is no upload, no server round-trip, and no risk of your data being logged or stored by a third party.
Common use cases include converting RSS or Atom feed XML into JSON for a JavaScript front-end, migrating SOAP API responses to a REST-friendly format, transforming configuration files from XML-based systems like Maven or Spring into JSON for modern tooling, and cleaning up XML exports from databases or CMS platforms before importing them into a new system. The tool supports XML documents of any size that your browser can hold in memory, making it practical for both small snippets and large data exports.
<?xml version="1.0"?>).@. Uncheck "Include attributes" to drop them from the output if your use case does not require them.Understanding how XML concepts map to JSON makes it easier to work with the output:
<city>Paris</city> becomes "city": "Paris".id="5" on an element becomes "@id": "5" alongside the element's other children in the JSON object.#text alongside the attribute keys. Enable "Force text nodes as #text" to apply this rule to all text content regardless of context.