XML to JSON Converter

Convert XML markup to structured JSON format instantly.

XML Input
JSON Output
JSON output will appear here

About the XML to JSON Converter

This tool converts XML to JSON, mapping elements to keys, repeated elements to arrays and attributes to their own entries. It is the quickest way to make a SOAP response, RSS feed or legacy export usable in modern code.

Convert XML to JSON when you have to consume something older than your codebase: a SOAP response, an RSS or Atom feed, a sitemap, a bank statement export, or any enterprise integration that still ships angle brackets.

XML has features JSON does not, so the mapping has to make decisions and state them. Attributes are kept as their own entries rather than discarded, repeated sibling elements become arrays instead of overwriting each other, and namespace prefixes are preserved so a prefixed element stays distinguishable.

Text content mixed with child elements is retained rather than dropped, which matters for feed descriptions and any markup-in-content case where a naive parser silently loses the text.

How to use the XML to JSON Converter

  1. Paste your XML. Provide the XML document.
  2. Convert. Run the parse to produce JSON.
  3. Check the shape. Confirm repeated elements became arrays where you expected them.
  4. Copy or download. Copy the JSON or save it as a .json file.

XML to JSON Converter features

  • Repeated sibling elements become a JSON array
  • Nesting preserved to full depth
  • Parse errors reported with the position
  • Copy the result or download it as a .json file
  • Attributes are not carried across — see the FAQ below

Frequently asked questions

What happens to XML attributes?

They are dropped. Only element names and their text content are carried into the JSON, so an attribute such as the href on an Atom link will not appear in the output. If the values you need live in attributes, rewrite them as child elements before converting.

How are repeated elements handled?

Repeated sibling elements with the same tag become a JSON array rather than overwriting one another, so a list of items converts to a list.

Are namespace prefixes preserved?

Not as prefixes. A namespaced element arrives as its fully-qualified name, so dc:creator becomes a key like {http://purl.org/dc/elements/1.1/}creator. The information is intact but the key is not the prefix you wrote.

Can it convert an RSS feed?

RSS, Atom and sitemap XML all parse, and for RSS — where the values sit in child elements — the result is usually what you want. Atom fares worse, because its link targets are attributes and those are dropped.

What about text mixed with child elements?

When an element has both text and child elements, the text is discarded and only the children are kept. This affects HTML-like markup inside feed descriptions, so convert those fields separately if the inline text matters.