XML to JSON Converter

XML to JSON Converter is used to convert XML data or file into JSON format. The converter converts XML attributes, elements & text nodes into JSON properties. When possible elements are converted into arrays. The JSON output can be indented for easier viewing.

Converted on ToolSlick's server. Your input and its output are not stored.

Paste XML content below
Converted JSON

Settings

How the input is converted. Each is explained below.

History

  • 2018-05-14Tool Launched

Settings explained

Flatten Arrays
If selected, arrays are flattened when possible.
Flatten Arrays On
[
  {
    "author": "Gambardella, Matthew",
    "title": "XML Developer's Guide"
  },
  {
    "author": "Ralls, Kim",
    "title": "Midnight Rain"
  }
]
Flatten Arrays Off
{
  "book": [
    {
      "author": "Gambardella, Matthew",
      "title": "XML Developer's Guide"
    },
    {
      "author": "Ralls, Kim",
      "title": "Midnight Rain"
    }
  ]
}
Attribute Prefix
The prefix to use for properties corresponding to XML attributes. Set blank to use no prefix.
Text Property Name
The name of the property that holds the value of XML text nodes.

Background

Extensible Markup Language (XML) is a widely used language that was once the de facto standard for data interchange between applications. Since the advent of JSON, however, it has lost the advantage to the more simple nature of JSON. Nevertheless, XML is still used by applications and SOAP based web services

JavaScript Object Notation (JSON), pronounced as Jason, is the most common data interchange format on the web. Douglas Crockford first released the JSON specification in the early 2000s. It is a simple format that is easier to comprehend than XML. It is also smaller in size because it does not have closing tags. A wide variety of programming languages can parse JSON files. They also support the serialization of data structures to JSON. You can copy JSON text to JavaScript and start using them without any modifications.