Conversion

XML to JSON

Convert XML to JSON.

XML input
Output

Result appears here after you select

{ } How to use

  1. Paste your XML.
  2. Select Process — malformed XML reports the line and column where parsing failed.
  3. Copy the JSON, or download it as a .json file.

{ } How it works

XML to JSON works on the text you provide. Select Process ▸ and it runs entirely in your browser — nothing is uploaded to a server — then shows the result in the Output panel.

Input

  • XML input — paste or type your input in the left panel (use Sample for an example)

Output

JSON — copy it, download it, or switch the Output panel to Tree view to explore it.

{ } Common uses

  • Read an XML API response or an RSS feed as JSON.
  • Query or diff an XML configuration with JSON tools.
  • Convert a legacy export into something your code can consume directly.

{ } Limitations

  • Attributes are kept with an @_ prefix, so id="1" becomes "@_id": "1", and the text of an element that also has attributes moves to a #text key.
  • An element that appears once becomes a single value and the same element repeated becomes an array, so the shape follows the document rather than a schema.
  • Text that looks like a number is converted to one, and comments, processing instructions and the XML declaration are dropped.

{ } FAQ

Is my data uploaded to a server?

No. Everything runs locally in your browser — your files never leave your device.

Can I process more than one file at once?

This tool works on one input at a time.

Is this tool free?

Yes — it’s completely free and needs no sign-up.

What are the @_ keys?

They are the attributes. The prefix keeps an attribute from colliding with a child element of the same name.

Why did a list with one item become a single object?

Nothing in the XML marks it as a list, so a single occurrence is indistinguishable from a lone value. Where a list can have one item, handle both shapes in your code.