XML to JSON Converter
JSON output
How to Use
Paste XML and the corresponding JSON appears immediately. Attributes are placed under `@attributes`, raw text under `#text`, and sibling elements with the same tag become arrays. Pick 2 or 4-space indent.
How the Conversion Works
XML and JSON are structurally different, so there's no clean 1:1 mapping. This tool uses a badgerfish-lite convention (`@attributes`, `#text`, arrays for repeated tags). It's good for inspecting SOAP responses, looking inside docx/xlsx, migrating XML configs, and similar tasks. For production-grade XML handling, use a dedicated library like fast-xml-parser or xml2js.
Use Cases
- Working with SOAP API responses as JSON
- Inspecting the inner XML of docx / xlsx files
- Migrating older XML configs to JSON
- Reviewing the structure of Atom / RSS feeds
- Converting XML to JSON to query with JSONPath
Privacy
Parsing and conversion happen entirely in the browser; the XML input never leaves your device. Internal config files or business data stay local.