Code Robo
Virtual Service
Tester / Comparator
Java Code Complience

XML To JSON Converter
Talk to EasyAssistant

Both XML and JSON are used almost every application. Converting xml to json is very common ask. XML To JSON Converter tool converts Xml to Json string. Takes XML as input and produces JSON string. It provides the option to add thrird bracket('[') for repetitive elelemts in XML.
Click Here To Watch A Demo On It(

XML.(* Required): It is required. | Watch A Demo
Add '[' When Repeatative Element Is There']' Output in compact format? Remove root element name from generated JSON string.

How It Works:
XML and JSON :
XML - is an extensible markup language which is used to exchange data between applications. Its like HTML but does not have any predefied tag.
JSON- is the JavaScript Object Notation and is the lightweight format for exchanging data. It first validate the input XML String and analyse it. It extracts the attributes and its values from the XML. Form the JSON string.
XML To JSON converter tool converts the XML string to its equivalent JSON format. It parse the input XML string. Analyse the elements and attributes. then converts xml attributes to the JSON keys with the prefix -.
Parameters are:
  1. XML: Source XML content.
  2. Remove Root Element Name: Whether to remove the root element name from the output JSON string or not.
  3. Add '[]': Whether to add the '[' ']' when there is a JSON array.
Steps to follow:
  1. Put XML content in the text area.
  2. Check the checkbox 'Add '[' When Repeatative Element Is There']' .
  3. Click on 'XML To JSON' button. Generated JSON will be displayed in the next page in a text area.
  4. Copy and save it..
XML file which has been used here:
<?xml version="1.0" encoding="UTF-8"?>
<Author DOB="" EMailID="" SSN=""> 
  <Extn ExternalSystemCode=""/> 
    <Book BookNo="1" Name="" PublisherCode=""> 
      <Extn ExtnGiftCoverCode=""/> 
      <Price DiscountPercentage="" ListPrice="" UnitOfMeasure=""/> 
<?xml version="1.0" encoding="UTF-8"?>
<Employee dateOfJoining="" department="" designation="" employeeNo="" firstName="" lastName="">
        <dependant age="" location="" name="" relation="">
            <mediclaimPolicy coverageDetails="" endDate="" policyName="" policyNo="" startDate="" sumInsuredAmt=""/>
Rules Used:
  • Attributes are treated as regular JSON properties
  • Terminal #text item types is converted into a JSON property.
  • Namespaces are ignored.
  • Attribute name starting with '_' is treated as element in the target XML.
  • Produces two JSON, One with same case. Another with XML Case (First letter of element and attribute in the target xml will be in upper case)
User Comments:
Thank you! I liked this tool very much as its converting the attribute in camel case in the produced JSON.

Excellent! Its adding extra '[' for JSON array intelligently!
Aparna Roy:
I liked it the way its automatically identifying JSON array!

Post Your Comment:
Name :
Email ( Optional*) :
Comments / Suggestion (* Required) It is required: :