UltKit

XML to JSON Converter

Move data out of a SOAP response, an RSS feed, a config file or a legacy system export and into the JSON your JavaScript, Python or no-code tool reads natively, without hand-writing a parser.

Data Converter

or drop CSV, TSV, TXT … files here ·

Max 95 MB per file· Up to 20 files· Deleted after 30 minutes

Output

Files are processed on our servers and deleted after 30 minutes.

How to use this tool

  1. 1

    Upload the XML

    Drop .xml files on the upload area, up to 20 per batch and 95 MB each. Each file is converted on its own.

  2. 2

    Choose readable or compact

    Pretty print is on, which indents the JSON for reading and code review. Turn it off under Advanced settings to get the smallest single-line output for an API payload.

  3. 3

    Convert and use the JSON

    Press Convert to JSON, download the .json file and load it in your code or tool.

Upload the XML and press Convert to JSON: elements become keys, repeated elements become arrays, and attributes are kept as @-prefixed keys, so no information in the tags is lost.

Who needs an XML to JSON converter

XML 1.0 became a W3C Recommendation in February 1998, and for the next decade it was how systems talked: SOAP web services, RSS and Atom feeds, Office documents, banking messages, product catalogs. Many of those systems are still running. JSON, specified in RFC 8259, took over new web APIs because JavaScript reads it without a parser library and because it maps directly onto lists and dictionaries in almost every language.

So the people converting are usually bridging the two eras. A front-end developer receives a SOAP response from a payment or shipping provider and wants a plain object. An automation builder in Zapier or Make pulls a supplier's XML feed into a flow that works best with JSON. A data engineer migrates config files from an old Java application, or a student needs an RSS feed as JSON for a class project. Each wants the same structure without the angle brackets.

Convert XML to JSON: how tags, attributes and text map

XML input: an order with an attribute, one customer and two items
<order id="A-77">
  <customer>Lena Ortiz</customer>
  <total currency="EUR">59.90</total>
  <item sku="0042">Desk lamp</item>
  <item sku="0108">LED bulb</item>
</order>
How each part of the order above appears in the JSON
XML constructExampleJSON result
Root element<order>Top-level key order
Attributeid="A-77""@id": "A-77"
Element with text only<customer>"customer": "Lena Ortiz"
Text plus attribute<total currency="EUR">{"@currency": "EUR", "#text": "59.90"}
Repeated elementtwo <item> tags"item": [ … , … ] array
Comment<!-- note -->Dropped; JSON has no comments

XML

Extensible Markup Language

XML is a markup language for structured data published by the W3C in 1998. It uses nested tags with attributes and supports schemas, namespaces and validation, which makes it robust for complex documents. It underlies RSS feeds, SVG, Office documents, sitemaps and many enterprise and government data exchanges. XML is verbose compared with JSON, but every programming language and many spreadsheet tools can read it.

Compression
–
Transparency
–
Animation
–
Introduced
1998 · W3C
XML converter

JSON

JavaScript Object Notation

JSON is a lightweight text format for structured data, popularised by Douglas Crockford in the early 2000s and standardised as RFC 8259 and ECMA-404. It represents objects, arrays, strings, numbers, booleans and null with simple, readable syntax. It is the default format for web APIs, configuration files and data exchange between apps in almost every programming language. It has no comments, dates or schemas built in, and large nested files are hard to read without a viewer.

Compression
–
Transparency
–
Animation
–
Introduced
2001 · Douglas Crockford
JSON converter

XML goes to JSON when data from an older or enterprise system has to reach a web app, a script or an automation tool: JSON parses natively in JavaScript and maps directly onto Python dictionaries.

XML features that JSON has no place for

Both formats describe trees, but XML carries extras JSON never had. Namespaces, defined by the W3C in 1999, let one document mix vocabularies such as soap: and xsi:; in JSON they survive only as part of key names. Comments and processing instructions have nowhere to go and are dropped. Mixed content, meaning text interleaved with child tags as in an XHTML paragraph with a bold word in it, is valid XML but turns awkward in JSON, so document-style XML is better converted to HTML or Markdown than to JSON.

Order is the subtle one. XML keeps sibling elements in sequence, and a schema may rely on it; a JSON object's keys are, by the standard, unordered. Repeated elements keep their order inside their array, which covers most real data. If the XML is a flat list of records that should end up in a spreadsheet rather than in code, XML to Excel gives you rows and columns directly, and XML to CSV produces a file for a database import.

XML to JSON converter questions

Why is one element an array in one file and an object in another?

A converter only sees what is in the document. If an order has three item tags, items become an array; if it has one, there is nothing to repeat, so it becomes a single object. Code that reads the JSON should accept both shapes, or wrap a single object in an array before looping.

How are XML attributes written in the JSON?

Each attribute becomes a key with an @ in front of its name, so currency="EUR" turns into "@currency": "EUR". When an element has both attributes and text, the text goes into a #text key next to them. This convention keeps attributes and child elements from colliding when they share a name.

Are numbers in the XML turned into JSON numbers?

XML has no data types of its own; 42 and "42" look the same in a tag. Values therefore come out as strings, which keeps ZIP codes and IDs like 007 safe. Convert the fields your code needs to numbers after parsing.

What happens to namespace prefixes such as soap:Envelope?

The prefix stays part of the key name, so the envelope appears as soap:Envelope and the namespace declaration as an @xmlns:soap key. That keeps elements from different vocabularies apart; strip the prefixes in your code if you only work with one.

Can I convert the JSON back to XML afterwards?

Yes, with JSON to XML. Following the same @ and #text convention, attributes return as attributes. Comments and the original indentation do not come back, since the JSON never held them.