XML ↔ JSON in the browser
Many APIs still speak XML while front ends and CLIs prefer JSON. This tool round-trips between the two formats using the fast-xml-parser library entirely in your tab: parse XML into a plain JavaScript object tree, or build XML from parsed JSON. You control whether output is compact or indented, how XML attributes appear in JSON (via a configurable prefix such as @), and whether an XML declaration is prepended when emitting XML.
XML → JSON
Paste XML and click Convert. The parser keeps attributes (with your chosen attribute name prefix on JSON keys), trims whitespace-only text noise, and produces JSON.stringify output — either minified or with 2-space indentation depending on Compact output.
JSON → XML
Paste valid JSON. Objects become element maps; bare arrays are wrapped under a synthetic root with item children; primitive roots are wrapped as value so the XML builder always receives an object. The builder honors the same attribute prefix when you encode @-style keys back to attributes, uses two-space indents when not compact, and can prepend <?xml version="1.0" encoding="UTF-8"?> when Include XML declaration is checked.
Privacy
Conversion runs client-side. Your XML and JSON are not uploaded to Dynamic Duniya servers for processing.