XML ⇄ JSON Converter
Convert a bounded, conservative XML tree to a documented JSON mapping locally.
This tool handles input and primary processing in your browser and is designed not to send the input to QuickKit’s server.
How it works
Attributes use @name and element text uses #text. Repeated elements become arrays. Formatting whitespace between child elements is normalized; leaf text whitespace is preserved. XML 1.0 line endings and CDATA-style attribute whitespace are normalized; JSON attribute whitespace is serialized as character references for round trips. JSON values outside the XML 1.0 Char production are rejected. Real mixed content, namespaces, comments, processing instructions, CDATA, DTDs, and unsupported XML names are rejected. Empty arrays and non-scalar @name or #text values are rejected. JSON numbers become XML text as their original JSON text and are never rounded through a JavaScript Number, so 9007199254740993, 1e400, and -0 stay unchanged. JSON nesting is limited to 1,000 levels, and the indented XML output to 8 MiB. Schema typing is not preserved, so this is not a lossless round trip.