XML → JSON Converter
Convert XML documents to structured JSON with configurable number/boolean parsing.
About this tool
The XML to JSON Converter parses any XML document and outputs an equivalent JSON representation, using fast-xml-parser's battle-tested parsing engine. This is a common integration task: many legacy APIs, SOAP services, and enterprise systems still speak XML, while modern frontends and JSON-based tooling expect JSON.
Element text content becomes JSON values, nested elements become nested objects, and repeated sibling elements automatically become JSON arrays. Attributes are preserved using the conventional @_ prefix (e.g. an id="42" attribute on a <user> element becomes "@_id": 42 inside the user object) — the same convention used by fast-xml-parser and many other XML-to-JSON libraries, so output is compatible with tools expecting this format.
A "parse numbers/booleans" toggle controls whether numeric-looking text (like <price>29.99</price>) and boolean-looking text (true/false) are converted to native JSON number and boolean types, or kept as strings. Turn it off when you need to preserve exact string formatting, such as leading zeros in IDs.
Parsing runs entirely in your browser. Malformed XML is caught and reported with a clear error message rather than silently producing partial or incorrect output.
