XML to JSON Converter
Convert XML to JSON and JSON to XML, with a configurable attribute prefix, #text keys for element text and arrays for repeated tags.
XML to JSON Converter
Output will appear here...Updated . Provided as is. Check the output before you rely on it in production.
How to use XML to JSON Converter
- 1
Choose a direction
Select XML to JSON or JSON to XML using the mode toggle at the top of the tool to set the conversion direction.
- 2
Paste your input
Paste your XML or JSON into the input panel on the left, or click Sample to load a worked example to convert.
- 3
Adjust the prefix
Change the attribute prefix if your data uses a marker other than @ to distinguish XML attributes from child elements.
- 4
Copy the result
Review the converted output in the right panel, then press Copy Output to send the result to your clipboard.
Questions and answers
What is an XML to JSON converter?
Is the XML to JSON converter free?
Does this converter store my data?
How are attributes and repeated tags handled?
For AI agents: how to call this tool
Machine-readable contract, endpoints and examples. Humans can ignore this section.
Best Path For Builders
Browser workflow
Runs instantly in the browser with private local processing and copy/export-ready output.
Browser Workflow
This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.
/xml-json-converter/
For automation planning, fetch the canonical contract at /api/tool/xml-json-converter.json.