ShadTools

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