DEVELOPER TOOL

XML to JSON Converter

Convert XML into readable JSON in your browser. Attributes, repeated elements and text are preserved using a documented object mapping.

XML to JSON Converter

FREE ONLINE TOOL

STEP BY STEP

How to use xml to json converter

  1. Check the converted output and resolve any input errors.
  2. Download the result or copy it to your project.

IN PRACTICE

Example

<book id="7"><title>North</title><tag>a</tag><tag>b</tag></book> becomes an object with @attributes.id, title and tag as an array.

GOOD TO KNOW

How are XML attributes represented?

Attributes are grouped under @attributes. Text-only elements become strings; elements containing both attributes or children store their text under #text. Repeated child names become arrays.