Convert JS Object to XML

Input data

This form allows you convert Javascript literal object to XML, paste or upload your JS object below:


Your result can be seen below.

Result of JS object conversion to XML


Move to "Paste Code" for Save it

About Javascript object conversion to XML

About JS Object conversion to xml

The Javascript object to XML Converter was created for online transform literal JavaScript object into XML document. You do not need to download any tools for conversion.

How it Works?

Just paste your JS Object to the textarea above and click to the button "Convert" and you will get XML.

Example of Javascript object conversion to XML

Before:
{
	animals: {
		dog: [
			{
				name: "Rufus",
				breed: "labrador",
				count: 1,
				twoFeet: false
			},
			{
				name: "Marty",
				breed: "whippet",
				count: 1,
				twoFeet: false
			}
		],
		cat: {
			name: "Matilda"
		}
	}
}
After:
<?xml version="1.0" encoding="UTF-8"?>
<animals>
  <dog>
    <name>Rufus</name>
    <breed>labrador</breed>
    <count number="true">1</count>
    <twoFeet boolean="true">false</twoFeet>
  </dog>
  <dog>
    <name>Marty</name>
    <breed>whippet</breed>
    <count number="true">1</count>
    <twoFeet boolean="true">false</twoFeet>
  </dog>
  <cat>
    <name>Matilda</name>
  </cat>
</animals>
After the conversion, you can apply the XML document to your project or use it for some other purpose.
Donate

Did you like this tool? You can donate to us. This will help us improve our free web tools.

Paypal