XML to JSON Converter
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
XML to JSON Converter transforms XML data into JSON format, making it easier to work with XML data in JavaScript applications. Paste your XML or upload an .xml file, and the tool generates clean JSON output. You can customize the conversion with options including pretty or compact formatting, attribute inclusion, root element inclusion, type preservation, and array threshold. The tool handles nested elements, attributes (prefixed with @), and converts text content to appropriate types. A preview shows the resulting JSON, and you can copy it to your clipboard or download it as a .json file.
WHERE IT RUNS
The extension runs entirely within your browser's local environment using the BotGentz framework. All XML parsing, JSON generation, and data processing occur on your machine without any network requests. No XML data, JSON output, or user activity is ever transmitted, uploaded, or stored externally. The tool works on any website and respects the browser's security boundaries, operating within the isolated extension sandbox. XML parsing uses the browser's native DOMParser API.
HOW TO USE
Click the extension toolbar icon to open the XML to JSON Converter panel. Paste XML data into the input area or click the file input to upload an .xml file. Click "Convert" to generate the JSON output. The preview shows the converted JSON with a clean, formatted display. Click "Copy JSON" to copy the output to your clipboard. Click "Download JSON" to save the output as a .json file. Toggle "Include attributes" to include XML attributes in the JSON output (prefixed with @). Toggle "Include root element" to wrap the output with the root element name. Toggle "Preserve types" to automatically detect and convert numbers, booleans, and null values. Select the "Output Format" (Pretty or Compact) to control the JSON formatting. Adjust the "Array threshold" (1-10) to control when repeated elements become arrays. The tool updates automatically when you change settings.
THE XML TO JSON ENGINE — WHY IT WORKS
Most XML to JSON converters use complex XSLT transformations or third-party libraries. This tool uses a recursive DOM traversal approach with the browser's native DOMParser. The engine first parses the XML string into a DOM document using DOMParser, then recursively traverses the document tree. For each element, it creates a JavaScript object with properties for child elements and attributes. Attributes are stored with an "@" prefix to distinguish them from child elements. Text content is detected when an element has only text nodes as children, and the value is stored as a string (or detected type if type preservation is enabled). The array threshold controls when multiple child elements with the same name are converted to arrays: if the count equals or exceeds the threshold, they become an array; otherwise, they remain as individual properties. The root element inclusion wraps the entire output in an object with the root tag name. This approach provides a clean, consistent conversion from XML to JSON.
THE PANEL
The XML to JSON Converter panel is fully draggable by its title bar and remembers its position on screen per website. It snaps to the edges of your browser window for clean alignment. Collapse the panel to a compact icon strip using the minimize button, restoring it with a single click. Resize the panel by dragging any edge or corner; the input area, output preview, and controls adjust proportionally. Press the Escape key to close the panel instantly. The panel maintains independent state for each browser tab, allowing you to convert XML in multiple tabs simultaneously.
PLEASE NOTE
This extension requires the free BotGentz extension framework to be installed and enabled. The tool uses the browser's DOMParser which supports standard XML; malformed XML will show an error message. The tool does not support XML namespaces or DTDs. Attributes are prefixed with "@" in the JSON output to distinguish them from child elements. The type preservation is heuristic-based and may not detect all type conversions correctly. Large XML files may take a moment to process. All conversion data is processed locally and is never transmitted, logged, or shared. The extension requests no network permissions and functions entirely offline. The source code is fully auditable and available for review.