XML to JSON Converter

Turn XML documents into JSON

How to convert XML to JSON

  1. Paste your XML, such as a SOAP or legacy API response, an RSS or Atom feed, a sitemap, a Maven POM or an exported configuration.
  2. The JSON appears instantly. Element names become keys, attributes become keys prefixed with @, and text in an element with attributes is stored under #text.
  3. Elements that repeat, such as several <item> entries in a feed, are grouped into an array. Tick Always use arrays to make every element an array, which keeps the shape stable when a list sometimes has only one item.
  4. Copy the JSON or download it.

Why convert?

Most modern tools, front-end frameworks and databases prefer JSON. Converting lets you process XML data with JavaScript, jq, Python dictionaries or a NoSQL database, inspect a large XML response in a more compact form, or create fixtures for tests. The mapping follows the common conventions used by libraries such as xml2js and fast-xml-parser, so code written against this output will feel familiar.

Comments and processing instructions are skipped, namespaces keep their prefixes, and all values remain strings because XML text has no types. Invalid XML is reported with the parser's error message.

Conversion uses your browser's built-in XML parser and runs locally.

FAQ

How are XML attributes represented?

As keys with an @ prefix, for example {"@id": "7"}. You can change or remove the prefix in the options.

Why is a single item not an array?

An element that appears once becomes an object. Tick "Always use arrays" if your code expects arrays everywhere.

Does it convert RSS feeds?

Yes. Paste the feed XML; channel items become an array of objects with title, link and description.

Made by BufferMint. We also design and build software products for founders. See our services →

Your files and inputs never leave your device; we only count anonymous visits.