JSON to XML / XML to JSON Converter

UTILITY Convert between JSON and XML
💡
How to use JSON to XML / XML to JSON Converter
Paste the JSON data into the input area. Review the conversion settings and structure.
INPUT
RESULT
Enter JSON or XML.

What this tool does

Convert pasted JSON into XML or XML into JSON. Choose the conversion direction and copy the generated text.

Illustration explaining how JSON to XML / XML to JSON Converter works

How to use it

  1. Paste JSON or XML text into the input area.
  2. Click “JSON→XML” or “XML→JSON” to choose the conversion direction.
  3. Review the generated output and adjust the input if needed.
  4. Use “Copy” to copy the converted text.

Supported input and notes

JSON and XML represent structure differently, so nested data, blank values, or field names may affect the output. Review the converted data before using it in production.

When it is useful

Useful when integrating systems that require different structured-text formats or inspecting how JSON objects and XML elements map to one another.

Convert JSON and XML Both Ways

Switch between JSON to XML and XML to JSON while translating keys and tag structures.

JSON → XML

JSON keys become XML tag names, and nested objects or arrays become nested tags.

XML → JSON

XML tag names and child elements become JSON fields and nested values.

Arrays Repeat the Same Tag

JSON arrays are written as repeated tags. If the entire JSON value is an array, it is wrapped in <items> with repeated <item> elements.

Some Key Characters Are Replaced

Characters that are unsuitable in generated XML tag names are generally replaced with underscores. The tool does not guarantee that every possible JSON key becomes a fully valid XML name.

XML Attributes Are Not Preserved

XML to JSON focuses on tag names, text, and child elements. Attributes such as id="10" are not included in the JSON result.

Not a lossless round trip: XML attributes and complex mixed-content structures are not preserved exactly. Check the converted result when those details matter.

Repeated Tags Become Arrays

If the same tag appears more than once at the same level, the JSON result groups those values into an array.

Text Stays as Text

Values that look like numbers or true/false remain text when they come from XML element content.

Check the Top-Level Structure

A top-level JSON array gets one <items> wrapper. A JSON object with several top-level keys can produce several top-level tags, so some uses may require adding a single root element afterward.

FAQ

Are XML attributes included in JSON?

No. Attributes are not converted into JSON fields.

What happens to repeated XML tags?

Repeated tags at the same level become a JSON array.

Are JSON keys always kept exactly as XML tags?

Not always. Some unsuitable characters are replaced with underscores.