Convert XML to JSON
Convert XML documents into structured JSON objects using the native browser DOM parser.
- 100% free
- Files stay on your device
- No sign-up, no watermark
XML to JSON Converter
Parse XML locally and produce formatted JSON.
// Your converted JSON will appear here.
Runs in your browser
The conversion UI uses browser APIs and does not require a developer account or server-side API.
Readable JSON
Output is formatted with two-space indentation so it is easier to inspect and edit.
No fake promises
Supported syntax and edge cases depend on the parser used by each conversion tool.
Related Developer Utilities
What is XML to JSON converter?
XML to JSON converts XML documents — API responses, RSS feeds, sitemaps, config files — into JSON that is easy to use in JavaScript and modern APIs. Nested elements become nested objects, repeated elements become arrays, and attributes are kept alongside element values. The browser’s built-in XML parser validates the document, so malformed XML produces a clear error rather than partial output.
How to use XML to JSON converter
- 1
Paste XML
Paste an XML document or load the sample.
- 2
Convert to JSON
Click Convert to JSON to parse the XML and build the JSON structure.
- 3
Copy or save
Copy the JSON or save it as a .json file.
Frequently asked questions
Are XML attributes preserved?
Yes. Attributes are included in the JSON output together with the element’s text and children.
Why did I get a parse error?
The XML is not well-formed — usually an unclosed tag, an unescaped & character, or more than one root element.
Can it convert large XML files?
Yes, within your browser’s memory. Files of several megabytes convert in a second or two.
Last updated: