XML to JSON Converter

Paste XML, get JSON you can actually read.

Paste XML from a SOAP response, an RSS feed or a configuration file and get JSON that is far easier to read and query. Elements become keys, repeated sibling elements become arrays, and attributes are preserved with an @_ prefix so nothing is lost.

Numeric and boolean text is typed automatically. Use the Tree view to explore large documents by collapsing the branches you do not need.

How to use it

  1. Paste XML into the left editor.
  2. Check the status indicator for well-formedness errors.
  3. Copy or download the JSON from the right pane.

Questions

How are XML attributes represented?

Each attribute becomes a key prefixed with @_ on the element's object, for example @_id.

When does an element become an array?

When the same element name appears more than once under one parent. A single occurrence is converted to a single value.

Are namespaces kept?

Yes. Prefixed names such as soap:Body are kept as they are written, as plain keys.

All tools