XML to JSON
Convert XML to a JSON structure online. Elements, attributes, and text are preserved in a predictable shape.
- 100% client-side, nothing uploaded
- Instant results
- Works offline once loaded
Empty
Empty
How it works
About this tool
This XML to JSON converter parses XML and produces a JSON object that mirrors its structure. Child elements become nested objects, repeated elements become arrays, and attributes are preserved with an @ prefix.
Text content is type-inferred where it is unambiguous, so numeric and boolean values become real JSON types. Elements that have both text and attributes keep their text under a #text key so nothing is lost.
Use it to inspect XML feeds, migrate legacy XML configs toward JSON APIs, or preview how an XML document would look as objects and arrays.
Parsing uses your browser’s built-in XML engine and runs entirely on your device, keeping your data private.
JSON Toolbox processes all data locally in the browser. Nothing is uploaded to a server.
Common questions
Frequently asked questions
How do I convert XML to JSON?
How are attributes represented?
What about repeated elements?
What if the XML is malformed?
Keep exploring