XML to JSON Converter

Convert XML from feeds, SOAP responses or legacy exports into JSON. Attributes become @-prefixed keys, repeated elements become arrays, and mixed text becomes #text.

Input

The result will appear here.

Ready In: 0 B Processed locally

How to use the XML to JSON

  1. Paste XML or drop an .xml file.
  2. Choose whether to detect numbers and booleans.
  3. Press Convert.

Features

  • Well-formedness check with line and column of the first XML error
  • Attributes, text and repeated elements handled consistently
  • Optional "always use arrays" mode for predictable shapes
  • DOCTYPE and entity definitions are refused, so entity-expansion attacks cannot run

Supported input

Well-formed XML up to 20 MB.

Limitations

  • XML comments and processing instructions are dropped.
  • Documents with a DOCTYPE declaration are rejected for security.

Privacy

Everything this tool does happens in your browser. What you paste or open is never uploaded, stored, logged or used for advertising. Closing the tab discards it. Read the privacy policy.

Frequently asked questions

01Why is a single child an object but two children an array?

XML cannot tell you whether an element is meant to repeat. Turn on "Always use arrays" if your code needs a consistent shape.

02Is my data uploaded anywhere?

No. This tool runs entirely in your browser tab. Your input is never sent to our servers, stored, or logged. You can disconnect from the internet after the page loads and it keeps working.