CurlyJSON
Tools

XML to JSON Converter

Paste XML — get JSON. Attributes become @keys, repeated elements become arrays, and errors show the exact line.

XML
JSON

XML to JSON, without surprises

Converters often change your data quietly. This one keeps values exact and tells you whenever something can’t be carried over.

Predictable shape
Attributes as @keys, text as #text, and an “Always arrays” option for code that expects lists.
Safe types
Text stays text unless you ask for numbers — and IDs with leading zeros are never touched.
Validation built in
Mismatched tags are reported with the line and column.
Private & free
Runs in your browser — config files with secrets never leave your computer.
Paste, drop or open
Drop a .xml file anywhere on the input, or switch direction with one click.

Frequently asked questions

How are attributes shown?+

As keys starting with @, like "@id": "42". Element text next to attributes is stored under "#text".

Why is a single child not an array?+

By default one child element becomes an object and several become an array. Turn on “Always arrays” for a predictable shape where every child element is an array.

Are numbers converted?+

Only if you turn on “Detect numbers”. Even then, values with leading zeros (like 007) and very long numbers stay strings, so zip codes and IDs are safe.

Is my data uploaded?+

No. Conversion runs in your browser.