Sign in

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. 1

    Paste the JSON

    Paste it or choose a .json file.

  2. 2

    Check the XML

    Indented XML with an XML declaration appears at once.

  3. 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.