Toolora

XML to JSON

Convert XML documents into readable JSON objects and arrays.

The XML to JSON tool parses XML documents and converts them into indented JSON. Attributes are grouped under @attributes, repeated sibling tags become arrays, and text-only elements become strings.
Array mode

How to use

  1. Paste an XML document into the input field.
  2. Choose Auto or Always arrays to control how repeated tags are grouped.
  3. Copy the generated JSON from the output.

Frequently asked questions

How are attributes represented?

Element attributes are grouped in an @attributes object so they stay separate from child elements and text.

Can the parser handle XML declarations and comments?

Yes, XML declarations, doctypes, processing instructions and comments are skipped during parsing.