My Learning

Keep this for later

Sign in or create a free account to save it. You’ll return to this page afterward.

Sign inCreate an account

XML to JSON

Convert a bounded XML document into a documented JSON representation.

Maximum 100,000 characters. Input is processed for this result; do not paste secrets or sensitive personal data.

DOCTYPE and entity declarations are rejected. Repeated sibling elements become arrays; attributes appear under @attributes.

How to use this tool

Paste XML with one root element and select Process data. Review the JSON structure before using it in an application.

Important to know

Convert a bounded XML document into a documented JSON representation.

DOCTYPE and entity declarations are rejected. Attributes appear under @attributes, element text under #text, and repeated sibling elements become arrays. Mixed-content order is not preserved.

Formula and methodology

The XML DOM is traversed from its root; child elements map to keys and repeated names map to arrays.

Frequently asked questions

Will XML convert back to the identical document?

No. XML and JSON model namespaces, attributes and mixed content differently.