JSON to XML Converter

Build XML from JSON using a documented compact or ordered mapping.

Data & Formats
Preparing your workspace…
Input
Output
Your result will appear here.

How to use

  1. Paste the source, open a UTF-8 file or try the Sample.
  2. Choose the options and run the conversion or enable Auto run.
  3. Review the result, then copy a selection or download the complete text.

JSON to XML Converter

Use one root JSON property in Compact mode, or disable that option and enter a root element name. The @ object becomes attributes and #text becomes text content. Arrays become repeated elements.

Processing stays in your browser. DevToolsy does not receive the pasted data or selected file.

Input and processing

Use Ordered content to read the name/attributes/children structure produced by XML to JSON. It preserves interleaved text and element order. Output includes a UTF-8 XML declaration. Root arrays and arrays nested directly inside arrays use the configured array item name; arrays under object properties repeat that property’s element name.

Worked example
Input
{"team":{"@":{"region":"EU"},"member":["Ada","Lin"]}}
Output
<?xml version="1.0" encoding="UTF-8"?>
<team region="EU"><member>Ada</member><member>Lin</member></team>

This example uses the default settings.

Result and limitations

null and invalid XML names or characters are rejected. Namespaced elements need namespace declarations. The converter creates XML text locally and does not execute or fetch anything.

Using the output

Review the result, then copy a selection or download the complete text.

Processing limits

UTF-8 input up to 1 MiB; output up to 8 MiB. Processing stops after 30 seconds.

?

Frequently asked questions

How is the XML root chosen?

Use one root JSON property in Compact mode, or disable that option and enter a root element name. The @ object becomes attributes and #text becomes text content. Arrays become repeated elements.

Can I preserve mixed content order?

Use Ordered content to read the name/attributes/children structure produced by XML to JSON. It preserves interleaved text and element order. Output includes a UTF-8 XML declaration. Root arrays and arrays nested directly inside arrays use the configured array item name; arrays under object properties repeat that property’s element name.

How are null values and invalid names handled?

null and invalid XML names or characters are rejected. Namespaced elements need namespace declarations. The converter creates XML text locally and does not execute or fetch anything.

Is the input uploaded?

Processing stays in your browser. DevToolsy does not receive the pasted data or selected file.

Can I keep the result?

Review the result, then copy a selection or download the complete text.

Find your next tool

Language

Switch language? Your current work will be cleared. Copy or download it first.