XML to JSON Converter
Convert simple XML into JSON.
XML into JSON
Legacy feeds and configs often arrive as XML. This converts simple XML — elements, attributes, and text — into a JSON structure your code can consume directly.
It modernises a legacy feed or config into JSON your code can traverse directly, though heavily namespaced or mixed-content XML is worth checking by eye after converting.
Best for simple XML
Mixed content and namespaces can be ambiguous, so verify complex documents. The conversion runs in your browser and nothing is uploaded. Your data is converted on your device and never uploaded.
Frequently asked questions
What does this xml to json converter do?
Convert XML snippets into structured JSON without uploading anything.
How are attributes converted?
Each attribute becomes a key prefixed with @, so <item id="3"> becomes {"@id": "3"}. When an element has attributes and text, the text goes under #text.
What happens to repeated elements?
Sibling elements with the same name are grouped into an array. A single child stays a plain value, so check both shapes in code that reads the JSON.
Are numbers converted?
No. All text and attribute values stay strings, because XML has no data types. Convert them in the code that reads the JSON.
Related tools
More free browser utilities for data cleanup, formatting, and developer workflows.