Skip to main content
${format:vault}

XML → JSON Converter

XML Input
Tab inserts an indent. Press Escape, then Tab, to move focus out of the editor.
JSON Output

Why use a private XML to JSON converter?

XML documents often contain credentials, internal hostnames, or proprietary data structures — especially SOAP responses, enterprise config files, and Android manifests. This converter processes your XML entirely in your browser using fast-xml-parser. Nothing is uploaded or transmitted.

How it works

The XML is first validated for well-formedness, then parsed into a JavaScript object tree. Attributes are mapped to @prefixed keys and element text content to #text. The resulting object is serialized with JSON.stringify().

Numeric and boolean attribute/element values are automatically parsed to their native JSON types. CDATA sections are preserved under #cdata.

Common use cases

  • Converting SOAP API responses to JSON for processing in JavaScript or Python
  • Transforming Android AndroidManifest.xml into JSON for tooling or analysis
  • Converting Maven pom.xml dependency trees to JSON for dependency graphing
  • Parsing RSS or Atom XML feeds into JSON for a feed reader or aggregator
  • Converting XML config files (Spring, Log4j) to JSON for migration tooling
  • Exploring large XML responses from enterprise APIs without writing parsing code

Frequently asked questions

Is it safe to convert XML that contains credentials or sensitive config?
Yes. fast-xml-parser runs entirely in your browser — your XML is never sent to any server. You can verify this in DevTools → Network.
How are XML attributes represented in JSON?
Attributes are prefixed with "@" in the JSON output (e.g. <item id="1"> becomes { "@id": 1 }). Text content of elements that also have attributes is stored under "#text".
What happens to XML namespaces?
Namespace prefixes are kept as-is in the JSON keys (e.g. <ns:element> becomes { "ns:element": ... }). Namespace declarations (xmlns:*) are treated as attributes.
Are attribute values parsed as numbers and booleans?
Yes. Numeric and boolean attribute values are parsed to their native JSON types (e.g. id="1" becomes "@id": 1). Wrap values in quotes if you need them to stay as strings.

Related tools