JSON to XML Converter

Paste JSON and get XML — objects become elements, arrays repeat their element, and special characters are escaped. Everything runs in your browser; nothing is uploaded.

How it converts

Each JSON object key becomes an XML element; nested objects nest; an array repeats its element once per item (e.g. "book":[…,…] → two <book> elements); empty objects/arrays and nulls become self-closing tags; and & < > are escaped. Keys that aren't valid XML element names (spaces, leading digits) are sanitized. XML has no single canonical mapping from JSON, so this uses the common element-per-key convention; tweak the root name above.

Need the other direction or a closer look?

Explore or validate the JSON first in the JSON viewer, or convert to YAML / CSV.