XML to JSON
Parse XML as JSON, retaining attributes and string values.
How to use XML to JSON
Parse XML as JSON, retaining attributes and string values.
- Select Load example or paste your own test input.
- Choose Run and review the available options.
- Run the selected action; review any validation message.
- Inspect the output before copying, printing or downloading it.
A small example
Input:
<root><person id="1">Kishan</person></root>
Example output:
{
"root": {
"person": {
"#text": "Kishan",
"@_id": "1"
}
}
}When the result looks wrong
Check attributes, repeated elements and text content after conversion. Do not assume round-trip equivalence with every XML vocabulary.
Questions about XML to JSON
Is my input uploaded?
File and text processing runs in your browser. Opening the website still loads application assets from its host.
What if the result looks wrong?
Check attributes, repeated elements and text content after conversion. Do not assume round-trip equivalence with every XML vocabulary.
Can I use sensitive production data?
Prefer non-sensitive test data. Never paste live access tokens, passwords or confidential documents into a site without assessing its code and environment.
Supported input and output
Text input; check the selected action and example for the expected syntax.
See the result panel and available copy or download controls for the selected action.
