XML to JSON
Runs locally in your browser. Nothing leaves your device.Convert XML files or pasted XML text to JSON directly in the browser.
XML settings
Input
Output
Paste valid XML to see the JSON preview.
Paste valid XML to see the JSON preview.
How it works
- 1
Paste XML or open a file
Paste XML or open an XML, SVG, RSS, or TXT file.
- 2
Choose the representation and options
Choose Compact or Ordered, plus namespace and type-detection options.
- 3
Copy or download the JSON
Copy the generated JSON or download it as a file.
Good to know
The XML to JSON converter converts XML documents into JSON directly in your browser, with two representations: Compact groups elements by name, Ordered preserves the order of all nodes — important for mixed content of text and elements. Namespace prefixes such as soap: can be stripped, with collisions reported.
Comments, the XML declaration, and processing instructions can optionally be carried over into the JSON result. A safe type-detection mode deliberately keeps values like 00123 as text to avoid loss of meaning; namespaces, attributes, and mixed content can make the JSON output more nested than expected.
Typical use cases
Evaluate a SOAP response without namespace noise
Strip namespace prefixes such as soap: or ns2: to get a SOAP response as clean JSON without prefix noise.
Correctly preserve mixed text and markup content
Choose the ordered representation when an element contains both text and nested elements and order matters.
Tips for better results
Prefer Compact for simple data structures
For pure data structures without mixed content, the compact representation produces cleaner JSON than the ordered one.
Check namespace collisions after stripping
If two different namespaces use the same local element name, the tool reports a collision — check these cases deliberately.
Features
Compact or Ordered
Group elements by name or preserve the exact order of all nodes.
Strip namespace prefixes
Remove prefixes such as soap: from element and attribute names, with collisions reported.
Local processing
Your file never leaves your device; conversion runs entirely in the browser.
Frequently asked questions
What's the difference between Compact and Ordered?
Compact groups elements by name for simpler structures; Ordered preserves the exact order of all nodes, important for mixed content.
Is my file uploaded?
No. Conversion runs entirely locally in the browser.
More tools
Looking for another tool?
Every tool runs locally in your browser – no sign-up, no upload, and it works offline.