XML to JSON Converter
Convert XML documents into JSON.
This free XML to JSON converter parses XML with the browser's built-in DOMParser and maps it to structured JSON, live as you type. Elements become objects, repeated child elements become arrays, and text content is stored under #text when an element also carries attributes or children. Both panes are syntax-highlighted.
Control how attributes map: group them under an @attributes key (the default), flatten them as @-prefixed keys alongside child elements, or drop them entirely. Turn on Infer numbers & booleansto coerce text like 42, true and nullinto real JSON types instead of strings, or Drop root wrapper to unwrap the single top-level element. Output can be pretty-printed at 2 spaces, 4 spaces or a tab, or minified to one line.
Paste XML, upload a file, or drag-and-drop it onto the input pane — SVG, RSS, Atom, WSDL and XSD are all just XML. Copy or download the JSON with one click. Parse errors report the exact problem the browser found instead of failing silently, and the status line shows the line and byte count of the result.
Related tools
Color Converter
Convert between HEX, RGB and HSL colors.
Unit Converter
Convert length, weight & temperature units.
Length Converter
Metres, feet, miles, inches & more.
Weight & Mass Converter
Kilograms, pounds, ounces, stone & more.
Temperature Converter
Celsius, Fahrenheit & Kelvin.
Area Converter
Square metres, acres, hectares & more.