All 127 tools

XML to JSON Converter

Convert XML to JSON. Attributes become @-prefixed keys and repeated elements become arrays. Uses your browser's XML parser.

Runs in your browser. Nothing you paste is sent anywhere.

Working…

About this tool

Paste an XML response, RSS feed or config file. Parsing errors are reported with the parser's message.

Reading XML responses as JSON

XML is verbose and can be tiring to read, especially when a response is deeply nested or full of namespaces. Converting it to JSON makes the structure easier to scan and much easier to use in JavaScript and most modern languages. Developers use this when working with SOAP services, RSS and Atom feeds, sitemaps, legacy APIs and configuration files from older tools.

The converter keeps the information in the original. Attributes are kept alongside child elements, and text content is preserved. When an element appears more than once at the same level, the repeats are gathered into an array, which is usually what you want for lists of items such as products, entries or records. If the XML is malformed, for example with a missing closing tag, the parser reports the problem so you can fix it.

Keep one quirk in mind when you write code against the result. An element that appears once becomes an object, but the same element appearing twice becomes an array. If a feed sometimes has one item and sometimes several, your code should handle both shapes, or normalise them into an array every time. Numbers and dates in XML are text, so convert them explicitly when you need real values. For very large files, convert a sample first to understand the structure before processing everything. Once you have JSON, the formatter and JSON to TypeScript tools help you explore it and generate types. The whole process runs in your browser, so internal responses are not shared with anyone.

How to use it

  1. Paste your text into the input box, or open a file from your device.
  2. Adjust the options. The result updates instantly.
  3. Copy the result, or download it as a file where offered.

Questions

How are attributes represented?

As keys prefixed with @, matching the JSON to XML tool, so you can convert back and forth.

What happens to repeated elements?

Two or more sibling elements with the same name become a JSON array.

Last reviewed 16 October 2026.