JSON to XML Converter
Converts JSON into well-formed, indented XML.
Turn XML into clean JSON. Attributes, repeated elements, and text are mapped with predictable rules, so the result is easy to use in JavaScript and APIs.
.xml file.converted.json.XML and JSON don't map one to one, so the converter uses the widely used "@ and #text" convention:
<title>XML</title> → "title": "XML".@: id="b1" → "@id": "b1".#text.Input:
<book id="b1"> <title>XML Basics</title> <tag>xml</tag> <tag>data</tag> <price currency="USD">29.99</price> </book>
Output:
{
"book": {
"@id": "b1",
"title": "XML Basics",
"tag": [
"xml",
"data"
],
"price": {
"@currency": "USD",
"#text": "29.99"
}
}
}
"dc:title". Namespace URIs are not resolved.XML stores everything as text and has no way to say that 29.99 is a number. Keeping strings avoids turning an ID such as 007 into 7. Convert the fields you need in your code.
Yes. The JSON to XML converter reads the same @ and #text keys, so a round trip gives back equivalent XML.
They are left out, because JSON has no comment syntax.
No. The conversion happens in your browser.
Often used together with the XML to JSON Converter.
Converts JSON into well-formed, indented XML.
Converts XML into readable YAML, keeping attributes and repeated elements.
Turns a CSV table into an array of JSON objects.