File tools that never upload your files
Convert JSON to XML
A system expects XML but your data is JSON? Convert it into readable, indented XML with a proper declaration. The conversion runs in your browser, so the data stays on your device.
5 free data and file results; text tools such as the JSON formatter never count. Paid plans have no usage limits.
How it works
- 1
Paste the JSON
Paste it or choose a .json file.
- 2
Check the XML
Indented XML with an XML declaration appears at once.
- 3
Copy or download
Copy it or save it as an .xml file.
Why work without uploading
Valid element names
Keys with spaces or starting with a digit are adjusted so the XML stays valid.
Attributes when you want them
Keys starting with @ become attributes; #text becomes element text.
Private
Data is converted on your device.
Good to know
Each key becomes an element and each value its content. A JSON object with exactly one key becomes the root element; anything else is wrapped in a <root> element, and a top-level list becomes <item> elements inside it, because XML needs a single root.
Spaces and other characters that XML names cannot contain are replaced by underscores, and names that start with a digit get a leading underscore. The output is UTF-8 and indented with two spaces.
JSON from XML to JSON converts back to an equivalent XML, attributes included, which makes round trips possible.
Questions and answers
How do I create attributes?
Use keys starting with @, such as "@id": "7".
What is the root element?
The single top-level key, or <root> when there is none.
Is my JSON uploaded?
No. It is converted in your browser.
Can I paste JSON with comments?
No. Comments are not valid JSON; remove them first or check the input with the JSON formatter.
Related tools
- Convert XML to JSONWork with an XML feed, an invoice or a configuration file in modern tools by converting it to JSON. The element structure is kept, attributes included. Everything runs in your browser, so the XML stays on your device.
- JSON formatter and validatorMake an unreadable one-line API response readable, shrink a configuration file, or find the missing comma that breaks your JSON. The JSON is processed in your browser, so it never leaves your device — tokens and keys included.
- Convert CSV to XMLImport spreadsheet data into a system that reads XML. Each row of the CSV becomes a <row> element with one child per column. Everything runs in your browser, so the data stays on your device.
- Convert JSON to CSVGot JSON from an API or an export and need it in a spreadsheet? Each object becomes a row and each key a column, even for nested data. The conversion runs in your browser, so the JSON stays on your device.