JSON ↔ XML Converter
Convert JSON to XML and back with explicit rules for attributes, text and lists, using a parser that blocks entity attacks.
About this tool
Convert JSON to XML and XML to JSON with mapping you can see and change: keys starting with @ become attributes, #text holds an element’s text, and lists either repeat the element or wrap items in <item>.
XML is read by a strict parser that reports errors with line and column, checks that namespace prefixes are declared and refuses DTD entity declarations, which are behind attacks like the billion laughs. Nothing is ever fetched.
Keys that aren’t valid XML names, like “first name”, are renamed and listed. Converting XML to JSON lists what JSON can’t keep, such as comments and where text sat between child elements.