XML to JSON – Convert XML to JSON Online
Transform XML documents into JSON format. Choose between compact or pretty output. Handles attributes, namespaces, and arrays.
Converted output will appear here
Convert XML to JSON online. Handles attributes, namespaces, and nested structures. Free converter.
XML to JSON – Online Converter
Convert XML to JSON for use in web APIs and JavaScript applications. Supports attributes, namespaces, and custom mapping rules.
Example
<person id="1"><name>Alice</name></person>
→ {"person":{"@id":1,"name":"Alice"}}
Advanced Options
- Choose attribute prefix (default "@")
- Flatten arrays:
<items><item>1</item></items>→{"items":[1]} - Preserve text and element order
- Convert numbers and booleans automatically
Frequently Asked Questions
Everything you need to know about this tool
FAQs
Attributes become properties prefixed with '@' or nested under a special key.
Yes, optional flattening.
Yes, namespace URIs become part of keys.
Tags
#xml to json#convert xml to json#xml to json converter#xml to json online#free xml to json#xml to json with attributes#xml to json javascript#xml to json python#best xml to json tool#xml to json namespace