ToolSite

XML to JSON

Convert XML to a structured JSON representation. Attributes use @ prefix, text content uses #text key, repeated elements become arrays.

Input
XML
Output
JSON
Privacy FirstWorks OfflineNo Uploads

FAQ

What shape does the JSON output have?
Attributes are prefixed with @ (e.g. @class). Text content is stored under the #text key. Repeated elements of the same name become arrays. Empty elements become empty objects.
What about XML namespaces?
Namespace prefixes are preserved as-is in the output. JSON has no namespace concept, so xmlns attributes are treated like any other attribute.
Is my data uploaded anywhere?
No. All conversion happens locally in your browser.

Related tools