XML to JSON
Converts an XML document into JSON. Attributes become "@name" keys, text-only elements collapse to plain strings, repeated sibling elements become arrays, and mixed content keeps its text under "#text". Values stay strings because XML carries no type information. Runs entirely in your browser — nothing is sent to a server.
Converts an XML document into JSON. Attributes become "@name" keys, text-only elements collapse to plain strings, repeated sibling elements become arrays, and mixed content keeps its text under "#text". Values stay strings because XML carries no type information. Runs entirely in your browser — nothing is sent to a server.
Use cases
- Migrating a legacy XML feed into a JSON-based service
- Inspecting a SOAP response with JSON tooling
Examples
Element with an attribute
<note id="1"><to>Ada</to></note>
{
"note": {
"@id": "1",
"to": "Ada"
}
}FAQ
Is my data sent to a server?
No — this tool runs entirely in your browser.
Why do attribute names start with @?
JSON has no notion of attributes, so the @ prefix keeps them from colliding with child elements of the same name.