# Convert JSON to XML

Paste JSON and get XML back. Free, no signup, and nothing you paste is stored. The same conversion is available as an API call and to AI agents over MCP.

- Tool: [json-to-xml](https://setget.net/tools/json-to-xml.md)
- Endpoint: `POST https://setget.net/v1/tools/json-to-xml`
- Page: https://setget.net/convert/json-to-xml

## JSON and XML

- JSON: JSON is the data format of web APIs: nested objects, lists, text, numbers, true, false and null. It has no comments and is tiring to write by hand.
- XML: XML marks data up with named tags and attributes. Feeds, office documents, SOAP services and many enterprise systems use it. It is wordy, and everything in it is text until a program decides otherwise.

## What happens in this conversion

- What changes: Each key becomes a tag and each list becomes a run of tags with the same name.
- Names: XML tag names cannot contain spaces or start with a digit. A key like that is pointed out so you can rename it. XML needs one root tag: you can name it.

## Questions

**Is my JSON stored anywhere?** No. It is converted in memory and discarded. It is not saved or logged.

**How much JSON can I convert at once?** Up to 1 MiB in a single request.

**Can a script or an AI agent convert JSON to XML?** Yes. Call POST https://setget.net/v1/tools/json-to-xml with JSON, or use the run_tool tool of the SetGet MCP server with slug "json-to-xml". The code samples on this page are ready to copy.
