Z

How to Convert XML to JSON (Step by Step)

Convert XML to JSON in your browser — step by step, with a free XML to JSON converter.

Turn XML into JSON for easier consumption in JavaScript and APIs:

  1. 1

    Open the converter

    Open the XML to JSON tool.

  2. 2

    Paste your XML

    Paste valid XML into the input.

  3. 3

    Get JSON

    Elements become objects and attributes are preserved by convention (e.g. @attributes). Copy the JSON.

Do it now

Frequently asked questions

How are XML attributes represented in JSON?

JSON has no attributes, so converters use a convention — commonly an "@attributes" key or "@"-prefixed keys — to keep them.