DevTilt

XML to JSON

Parse XML into JSON for debugging, scripting, and modern APIs. Attributes are preserved with a special prefix. Repeated elements may become arrays.

Result

Paste XML, then Convert.

How to convert XML to JSON

  1. Paste an XML document or fragment.
  2. Click Convert.
  3. Attributes appear on JSON objects with an @_ prefix.
  4. Copy or download the formatted JSON. Fix malformed tags if the parser reports an error.

What is XML to JSON?

XML responses from banks, government APIs, and older SaaS products are painful to work with in JavaScript. This tool parses XML into a JSON structure you can manipulate with standard object syntax, fetch handlers, and JSON tooling.

Why use DevTilt's XML to JSON?

  • Parses XML elements, attributes, and text nodes
  • Outputs nested JSON objects and arrays
  • Handles common XML namespaces in element names
  • Clear errors for malformed XML input

Common use cases

  • Consuming a legacy XML API in a Node.js or browser app
  • Debugging SOAP responses in the network tab
  • Converting RSS or Atom feeds to JSON for a frontend
  • Inspecting XML config dumps from enterprise software

FAQ

Attributes are included on JSON objects with an @_ prefix on the attribute name, matching common XML-to-JSON conventions.
Yes. Paste the XML body. Large responses should stay under the 5 MB input limit.
Not always. XML and JSON model data differently — arrays, attributes, and null are the main differences.
No. Parsing runs in your browser.
Repeated XML elements with the same tag name become arrays. Mixed text and child elements may produce both #text and nested properties — inspect the structure before feeding it to strict parsers.