Convert JSON to XML Without Uploading
Map a JSON object or array to XML wrapped in a <root> element. You can indent with spaces or tabs, or produce a compact document, and optionally add an `<?xml version="1.0" encoding="UTF-8"?>` declaration. The root value must be an object or array, not a lone string or number.
This tool runs in your web browser: your files and text are processed on your device and are not uploaded to TidyKit servers. Free, no sign-up.
How to convert
1. Paste JSON. 2. Choose indentation and whether to add the XML declaration (off by default). 3. Copy the XML.
`{"city":"Lisbon"}` becomes a <root> with a <city>Lisbon</city> child. Array items are each written as elements under the root.
Limits
Nesting is capped at 100 levels. Key names must be usable as XML tags. This is a structural mapping, not a way to target an existing XML schema. Everything runs in the browser; nothing is uploaded.
Frequently asked questions
Can I convert a single JSON string or number?
No. The root must be an object or an array. Wrap a value in an object first if you need to.
Is my JSON uploaded?
No.
Does the tool accept JSON Lines (NDJSON)?
If the input is parsed as several values, they are treated according to the parser’s format. For a single document, paste ordinary JSON.
Will attributes be created?
Values become element content, not attributes. There is no special attribute syntax.
More JSON Tools
- Escape JSON – Escape special characters in JSON
- Compare JSON – Find differences between two JSON objects
- JSON to CSV – Convert JSON to CSV format
- Minify JSON – Minify JSON by removing whitespace
- Prettify JSON – Format and beautify JSON code
- Sort JSON – Sort JSON arrays by value or object keys alphabetically
- Stringify JSON – Convert objects to JSON string
- Validate JSON – Validate JSON code for errors