Skip to content

Convert XML to JSON

Converts XML to JSON whilst retaining attributes and repeated elements.

It works in your browser. We do not store or send anything you type.Free · No sign-up required

Workspace · Convert XML to JSON

Runs in your browser · 100% local
Cargando herramienta…
Files are processed in your browser; if you are signed in with history enabled, text results appear in your history.
Instructions

How to use it

01

Upload an .xml file or paste the XML.

02

Choose whether you want to include attributes and whether the JSON should be indented.

03

Convert, check the result and download the .json file.

Examples

Examples

SOAP response

Converts an XML response into a manageable JSON object.

Catalogue

Converts an XML catalogue containing repeated elements into a JSON array.

Reference guide

What you need to know

The XML must have a single root element. Attributes are prefixed with @, mixed text with child elements is stored in #text, and repeated elements are converted into arrays. The tool validates the document and displays an error if tags are not properly closed.

Frequently asked questions

Frequently Asked Questions

Such as keys prefixed with @, for example @id. You can disable this if you don’t need them.

Related tools

Other tools that can help with similar tasks.

More at Data→
Convert XML to JSON online · ByTooly