JSON ↔ XML Converter

Convert between JSON and XML formats instantly. Supports both directions: JSON to XML and XML to JSON. Choose your indent style and get beautifully formatted output.
All processing happens locally in your browser — your data is never uploaded to any server.
Also: All JSON Tools | JSON Viewer / Editor | JSONPath Evaluator | JSON Schema Validator | JSON → SQL / TOML | JSON Compare.
Direction: Indent:
Enter JSON data and click Convert
JSON to XML Conversion
JSON objects are converted to XML elements with keys as tag names. Arrays are wrapped in repeating <item> elements. Text values become text content within XML elements. XML attributes are preserved with @ prefix when converting back to JSON. The output is formatted with your chosen indentation for readability.
Elements vs attributes — the mapping question

XML has no arrays and JSON has no attributes, so conversion is a convention: JSON objects become elements with keys as tag names, arrays repeat an element, and XML attributes are marked with an @ prefix on the way back to JSON. Text mixed with child elements (mixed content) has no natural JSON representation — a converter must pick a field for the text.