Tools/XML to JSON Converter
Data & Config Formats

XML to JSON Converter

Parse XML markup into JSON — element attributes are prefixed with @_ and nested nodes and text content are preserved.

Free & unlimitedRuns in your browserNo sign-up required
Loading tool…
How it works

Three steps, no setup

1

Paste your XML

Works with attributes, nested elements, and mixed content.

2

Get JSON output

Attributes are kept distinct from child elements using an @_ prefix.

3

Copy the result

Feed it into any JSON-based pipeline or API.

Common questions

Frequently asked questions

What happens to XML attributes?
Each attribute is added to the JSON object as a key prefixed with @_, keeping it clearly separate from child elements.
Are repeated elements grouped into arrays?
Yes, sibling elements sharing the same tag name are automatically collected into a JSON array.
Chat with us
Usually replies in minutes