JSON to XML
Convert JSON objects, arrays, strings, numbers, booleans, and null values into readable, escaped XML with a configurable root element.
JSON input
XML output
Mapping JSON to XML
Object keys become element names, array entries become <item> elements, and XML-sensitive characters are escaped. Keys that are not valid XML names are preserved in an item element’s key attribute.
Frequently Asked Questions
How are JSON null values represented?+
Null values become self-closing elements with a nil="true" attribute.
How are JSON arrays converted to XML?+
Each array value becomes a repeated item element under the property that contains the array.
What happens to characters reserved by XML?+
Ampersands, angle brackets, quotes, and apostrophes are escaped so the generated XML remains well formed.
Related Tools
JSON to YAMLConvert valid JSON objects, arrays, and scalar values into deterministic YAML 1.2 with safe quoted strings and keys.→JSON Formatter & ValidatorFormat, validate, beautify, and minify JSON strings locally in your browser with precise syntax error messages and instant download controls.→JSON ValidatorFree online JSON syntax validator with precise line and column error reporting.→JSON MinifierCompress and minify JSON data instantly with local syntax error detection.→