XML to JSON Converter
Convert XML, SOAP envelopes, and namespaced payloads into clean JSON locally in your browser — with presets, XPath scope, namespace handling, and workflow handoffs.
- Presets cover Simple, Safe default, Lossless-ish, SOAP Body, SOAP Fault, and namespace/array strategies.
- Repeated sibling elements become JSON arrays; attributes appear under
@prefixes. - SOAP 1.1 / 1.2 envelopes are detected — convert the Body, operation payload, or Fault detail.
- Sensitive values (JWTs, bearer tokens, API keys, passwords) are flagged and can be redacted before sharing.
- Local-only: nothing is uploaded. Encrypted share links keep your raw XML out of analytics.
XML input
JSON output
Document summary
<Body>) usually maps cleanly to API JSON. For errors, prefer Fault detail.
local-name() if no prefix is declared.
password, token, secret, apiKey, etc.
Conversion caveats
XML and JSON have different data models. Attributes, namespaces, comments, processing instructions, mixed content, element order, and repeated elements require conversion conventions — there is no single canonical mapping.
- Simple is best for clean business data; it drops attributes and namespaces.
- Safe default preserves attributes and namespace prefixes — the recommended starting point.
- Lossless-ish preserves attributes, comments, PIs, CDATA, and mixed-content order.
- Array consistency may require force-array paths for API consumers.
- Namespace stripping can cause key collisions; the Namespaces tab highlights this risk.
- Type inference can change
"00123"to123or"true"totrue. Leading zeros, UUIDs, large IDs, and dates are preserved as strings even when inference is on. - XML-to-JSON conversion is not always reversible. If you need round-tripping, prefer Lossless-ish mode.
- All XML parsing, namespace analysis, XPath evaluation, SOAP detection, redaction, and exports run locally in your browser. No uploads.
- The Lossless-ish preset preserves comments, CDATA, processing instructions, and mixed-content order — best for fidelity.
- If you only need to inspect or query XML (XPath, tree view, namespace report), use the XML / XPath / SOAP Inspector.