Code · Made a little simpler

XML and JSON Converter

Convert XML to ordered JSON or JSON to typed XML on your device. Preserve mixed content, repeated elements and numeric digits, or export compact JSON.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

XML and JSON Converter: how to use it

  1. Choose a direction and a data mapping. Use Ordered XML nodes for general documents and Typed JSON values for ordinary JSON.
  2. Paste your source or select a local file. Use example loads a sample for the chosen direction and mapping.
  3. Convert, inspect the preview and download the complete JSON or XML file.

Limits and notes

Local files must be UTF-8 and at most 4 MiB. XML input supports up to one million UTF-16 code units, 100,000 nodes and 128 element levels. DTDs are excluded. The ordered mapping preserves XML node order, qualified names and attribute strings. Typed XML uses the XPath functions namespace and accepts supported map, array and scalar elements. XML lexical formatting may change.

How your privacy works →

XML and JSON Converter: common questions

How are repeated tags represented in JSON?

Each tag has an entry in its parent’s children array. Two item elements remain two separate entries. Character data between them is also an ordered entry.

Can I convert a large JSON ID to XML without rounding?

Choose Typed JSON values. The number element uses the original JSON number token, including long integer digits, fractional trailing zeroes and exponent spelling.

Guides