Convert JSON to XML
Some systems, such as SOAP services, RSS feeds and older enterprise integrations, still expect XML. Paste JSON and get an equivalent, well-formed XML document with a <root> element.
How to use it
- Paste JSON into the Input panel or open a file.
- The XML appears in the Output panel.
- Copy it or Download it as an
.xmlfile.
Conversion rules
- Object keys become elements; values become text content.
- Arrays inside objects become repeated elements with the key as the tag name; top-level arrays use
<item>. - Keys that are not valid XML names are made safe, for example
1st namebecomes_1st_name. &,<and>are escaped;nullbecomes an empty element.
More JSON tools
All tools are free and run privately in your browser.
JSON FormatterBeautify, validate & convert
JSON ValidatorFind errors by line and column
JSON ViewerCollapsible tree with search
JSON MinifierCompress JSON, see bytes saved
JSON RepairFix broken JSON automatically
JSONPath TesterQuery and filter JSON
JSON EscapeStringify and unescape JSON
JSON to YAMLReadable YAML for configs
JSON to CSVArrays to spreadsheet rows
JSON to XMLWell-formed XML output
CSV to JSONSpreadsheets to JSON arrays
JSON Schema GeneratorInfer a draft 2020-12 schema
JSON to TypeScriptInterfaces with optional fields
JSON to GoStructs with json tags
JSON to JavaRecords with Jackson annotations
JSON to KotlinData classes for kotlinx.serialization
JSON to SwiftCodable structs with CodingKeys
JSON to DartFlutter models with fromJson
JSON to C#Classes for System.Text.Json
JSON to C++Structs for nlohmann/json
JSON to CTyped structs for C
JSON to PHPReadonly DTO classes
JSON to PythonDataclasses with type hints
JSON to XML FAQ
How are JSON arrays represented in XML?
An array under a key becomes one element per item, all with that key as the tag name. A top-level array becomes item elements inside root.
Is my data uploaded to a server?
No. The JSON to XML runs entirely in your browser using JavaScript. Your data is never uploaded, logged or stored, and the tool keeps working offline after your first visit.