JSON to XML Converter
Turn JSON objects into well-formed XML, right in your browser.
Initializing Data Studio Workspace...
Conversion Guide
How to Convert JSON to XML
Some older APIs, feeds and enterprise systems still expect XML. Converting JSON means turning each key into an element and deciding how arrays and empty values should look. This page explains what the converter does with each.
- 01
Paste or Load JSON Data
Paste your JSON into the input editor. If it is not valid JSON, the error is shown before anything is converted.
- 02
Choose the XML Style
Pick XML for plain nested elements, XML - Properties for records with one child element per field, or XML - Nodes / Attributes to write fields as attributes.
- 03
Copy or Download the XML
The XML appears as soon as the JSON is valid. Copy it, or download it as a `.xml` file. Use Swap to convert in the other direction.
Frequently Asked Questions
Answers about this tool.
How are JSON arrays converted to XML?
Each array becomes an element named after its key, with one `<item>` element per entry, in the original order.
How are null values represented in XML?
A null value becomes an empty element, such as `<field></field>`. Note that XML cannot tell an empty string apart from null this way.
Is my JSON data uploaded to a server?
No. The conversion runs in a background worker in your browser, so the data stays on your device.
Related tools
JSON to YAML Converter
Turn JSON into readable YAML for Kubernetes manifests, GitHub Actions, and other config files.
Open toolXML to JSON Converter
Convert XML, including SOAP responses, into nested JSON, with element attributes included.
Open toolCSV to JSON Converter
Turn CSV and TSV tables into a JSON array of objects, one per row.
Open toolJSONPath Evaluator
Pull matching records out of JSON with simple dot-path JSONPath expressions like $.teams[*] and see every match.
Open toolJSON Schema Generator
Generate a Draft-07 JSON Schema from a sample payload, with types detected from your data.
Open toolAll Data Studio tools
Convert between 27 data formats in either direction, filter and reshape records, run simple JSONPath queries, generate JSON Schema, and create TypeScript, Go, C#, or Rust types. It all runs in your browser.
Open tool