JSON to XML

JSON to XML

Convert a JSON object into a UTF-8 XML document.

Try this example

Load the sample. Check that the ampersand is escaped and false remains visible in the active element.

{"name":"Tea & coffee","active":false}

Expected result

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <name>Tea &amp; coffee</name>
  <active>false</active>
</root>

Use a top-level object with XML-compatible keys. XML element text does not preserve JSON types when converted back.

Related walkthrough · Check JSON and export a reliable CSV


Avatar

DTool Team

Product Team

We build simple, reliable browser tools that make everyday digital work faster.

Cookie
We care about your data and would love to use cookies to improve your experience.

Learn how we use cookies