XML → JSON
Convert XML documents to JSON
No watermarkFree & unlimited
Mode
Input (XML)
Output (JSON)
All processing happens in your browser. No data is sent to any server.
About this tool
- 1
Paste or upload XML
Enter your XML content in the input area or upload an .xml file from your device.
- 2
Set conversion options
Choose how to handle attributes, text nodes, namespaces, and CDATA sections.
- 3
Review the JSON output
Inspect the generated JSON tree to confirm the structure matches your expectations.
- 4
Export the result
Copy the JSON to your clipboard or download it as a .json file.
- XML attributes are prefixed with @ by default - check the settings if you want them merged with child elements.
- Repeated XML elements with the same tag name are automatically grouped into JSON arrays.
- If your XML uses namespaces, enable namespace stripping for cleaner JSON keys.
- Validate your XML before converting - malformed XML will produce unexpected JSON structures.
- Preserves XML attributes as prefixed JSON keys
- Automatically converts repeated elements into arrays
- Handles CDATA sections, comments, and processing instructions
- Configurable namespace handling and attribute prefix
- Pretty-printed JSON output with syntax highlighting
- Convert SOAP API responses to JSON for use in modern JavaScript applications
- Transform XML configuration files into JSON for Node.js or Python projects
- Migrate legacy XML-based data stores to JSON-based systems
- Parse RSS or Atom feeds into JSON for frontend consumption
Attributes are converted to JSON keys prefixed with @ (e.g., @id). You can customize or remove this prefix in the settings.
Text content is stored under a #text key alongside child element keys in the same JSON object.
Yes. You can choose to preserve namespace prefixes in keys, strip them entirely, or map them to a separate metadata field.