JSON to XML

Convert JSON files or pasted JSON text to XML directly in the browser.

XML settings

Input

Private by design: your file never leaves your device.

Output

Paste valid JSON to see the XML preview.

Paste valid JSON to see the XML preview.

Good to know

The JSON to XML converter converts JSON into XML directly in your browser, with reserved keys for attributes, CDATA content, and text nodes. For arrays, you can choose between a wrapper element with same-named children or repeated elements, and the root mode determines whether a single property automatically becomes the root or a fixed wrapper name is used.

Typical searches include convert JSON to XML, JSON to XML converter, and create XML from JSON. JSON null can be mapped in four ways: empty element, omit, text "null", or xsi:nil. Invalid XML names are treated as an error by default, but can be sanitized by visibly replacing them with underscores; duplicate JSON keys can be blocked or resolved with the last value.

Typical use cases

Generate an API payload with attributes instead of only child elements

Use the reserved attribute key to output certain JSON properties as XML attributes instead of child elements.

Output array values as repeated same-named elements

Choose the “repeated” array style when a target system expects multiple same-named elements instead of a wrapper container with item children.

Tips for better results

Match the null representation to the target schema

Choose xsi:nil when the target schema expects XML-Schema-compliant null values, or an empty element for simpler XML consumers.

Clean up duplicate keys before converting

If duplicate JSON keys are blocked as an error, deliberately clean up the source data instead of automatically letting the last value win.

How it works

Step by step

  1. 1

    Paste JSON or open a file

    Paste JSON or open a JSON or TXT file.

  2. 2

    Set the structure and options

    Choose the array style, root mode, null representation, and reserved keys.

  3. 3

    Copy or download the XML

    Copy the generated XML or download it as a file.

Features

Reserved keys for attributes and CDATA

Deliberately map JSON properties to XML attributes, CDATA blocks, or text nodes.

Four null representations

Empty element, omit, text "null", or xsi:nil depending on the target schema.

Local processing

Your data never leaves your device; conversion runs entirely in the browser.

Frequently asked questions

How are array values represented in XML?

Selectable between a wrapper element with same-named item children or multiple repeated elements with the same name.

Is my data uploaded?

No. Conversion runs entirely locally in the browser.

More tools