JSON ⇄ XML Converter
Convert between JSON and XML both ways.
Attributes use an @ prefix and element text uses #text when converting XML → JSON.
How to use the JSON ⇄ XML Converter
- 1 Choose JSON → XML or XML → JSON.
- 2 Paste your data and set a root element name for XML output if needed.
- 3 Click Convert and copy the result.
Frequently asked questions
How are XML attributes represented in JSON?
When converting XML to JSON, attributes use an "@" prefix (e.g. "@id") and an element’s text content is stored under "#text". The same keys convert back into attributes and text.
What happens to repeated XML elements?
Repeated child elements with the same tag are collected into a JSON array automatically, so lists round-trip cleanly.