XML to JSON Converter
Paste XML and get clean, structured JSON. Handles attributes, namespaces, and auto-groups repeated tags into arrays.
Paste XML and get clean, structured JSON. Handles attributes, namespaces, and auto-groups repeated tags into arrays.
XML was once the dominant format for web services and configuration. Today, JSON has largely replaced it — but legacy systems, enterprise APIs, and SOAP services still produce XML. RealJSON's free XML to JSON converter handles the translation cleanly, running entirely in your browser.
Paste any XML document and click Convert. The output is a structured JSON object that faithfully represents the original XML hierarchy — no manual reformatting required.
XML attributes like <user id="1"> are preserved in the JSON output as properties alongside element content — no information is lost during conversion.
XML namespaces are handled gracefully, with namespace prefixes preserved in the JSON keys so you can trace the source of each property. Useful for SOAP responses and enterprise XML schemas.
In XML, repeated sibling elements like <item> in a list are automatically grouped into a JSON array. This is the correct behavior for representing collections and avoids the common pitfall where a single-item list isn't treated as an array.
After converting, use the JSON Viewer to explore the output structure visually, or the JSON Formatter to indent it neatly. If you're working with tabular data instead, the CSV to JSON converter handles spreadsheet exports.
Browse all free JSON tools →
Related tools