Category: Developer tools

XML to JSON Converter

Convert XML documents to readable JSON in your browser

Paste an XML document and convert it to JSON, with attributes, text content and repeated child elements mapped to readable keys. Parsing happens locally.

Paste XML to convert it to JSON.

JSON
The result will appear here.

Everything on this page is processed in your browser. Nothing is uploaded.

What this tool does

XML feeds, RSS documents and SOAP or config files are often easier to work with as JSON. This tool parses XML with the browser's built-in parser and rebuilds it as JSON, turning attributes into an @attributes object, direct text into #text, and repeated child tags into arrays.

How to use it

  1. Paste or type XML in the input box.
  2. Choose a 2 or 4-space indent for the JSON output.
  3. Copy the JSON result or download it as a .json file.

Privacy

This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.

Frequently asked questions

Is my XML sent to a server?
No. Parsing uses the browser's built-in DOMParser, and everything is processed in your browser tab.
What happens with malformed XML?
The tool surfaces the parser's error message instead of guessing, so you can fix the exact line that failed.
How are XML attributes represented?
Each element's attributes are collected into an @attributes object next to its text and child elements, so nothing is lost.