Convert XML to JSON online, attributes and all
The result appears here as you type.
Uses the browser XML parser, so what you get back matches what the browser itself would read. Attributes are kept with an @ prefix so they never collide with a child element of the same name, and repeated elements collapse into arrays. Attributes are kept with an @ prefix so they never collide with a child element of the same name.
If it will not parse
These are the messages people usually arrive with: XML parsing error: not well-formed, unclosed token, mismatched tag, error on line 1 at column 1. Paste the input that produced one and the result pane names the problem and points at it.
How to use the XML to JSON Converter, step by step
Real screenshots of the tool, captured while running it.
- 1
Open the tool
XML to JSON Converter opens empty, with xml on the left and json on the right.


- 2
Add your input
Paste your own xml, or load the sample. The json pane fills in as you type.


- 3
Read the result
The json appears on the right with copy and save beside it.

