Free JSON to XML Converter
Convert JSON to XML and XML to JSON, both directions, with attributes and arrays preserved. Runs entirely in your browser — nothing is uploaded.
Drop a JSON or XML file (or paste below)
JSON, XML · processed on your device
or press Ctrl+V to paste from your clipboard
<?xml version="1.0" encoding="UTF-8"?> <book id="42"> <title>Brave New World</title> <author>Huxley</author> <year>1932</year> <inPrint>true</inPrint> </book>
💡 Attributes map to @name keys and element text to #text; repeated tags become arrays. Use ⇄ to flip the direction and round-trip your data. Everything runs in your browser.
Common uses
- Convert JSON to XMLTurn a JSON object into well-formed XML.
- Convert XML to JSONParse XML into clean, typed JSON.
- Bridge JSON and XML APIsConvert payloads between services that speak JSON and XML.
- Convert Config FilesMove configuration between JSON and XML formats.
- Compare JSON and XML StructuresSee how the same data looks in JSON versus XML.
How It Works
JSON and XML are the two most common data interchange formats, and you frequently need to move between them. This converts in both directions, in your browser.
- 1You paste JSON or XMLPick a direction with the ⇄ toggle. The input is parsed locally — JSON with JSON.parse, XML with the browser's DOMParser.
- 2It maps the structuresGoing to XML, object keys become elements, "@name" keys become attributes, and arrays repeat a tag. Going to JSON, attributes become "@name" keys, repeated tags become arrays, and numbers/booleans are coerced.
- 3You get clean, indented outputThe result is pretty-printed and ready to use.
- 4Round-trip if you likeThe ⇄ button feeds the output back as input so you can convert back and check.
Config and data files can be sensitive. Both directions run entirely on your device — nothing is uploaded.
Related Tools
CSV to JSON
Convert CSV (or TSV) into JSON — array of objects or arrays — with a proper RFC 4180 parser, delimiter auto-detection, and type conversion. Runs in your browser.
YAML to JSON Converter
Convert YAML to JSON and JSON to YAML in both directions. Paste in either format and get the converted output instantly — no server upload required.
JWT Decoder
Decode and inspect any JSON Web Token. View header, payload, expiration, and standard claims. Everything runs locally in your browser — tokens never leave your device.