JSON ⇄ XML Converter

Convert JSON to XML and XML back to JSON. Custom root element, attributes via @keys, pretty output. Import files, copy or download.

PrivateIn your browserInstantUnlimited
Valid JSON

Use @key in JSON for XML attributes (e.g. "@id": "1"). Repeated tags become JSON arrays. Namespaces and CDATA are preserved as plain text only.

How it works

1

Paste or import

Paste JSON or XML text, or import a .json or .xml file up to 5 MB. When converting to XML, invalid JSON is flagged live.

2

Choose direction and options

JSON → XML lets you set the root tag and pretty-print XML. Use @property names for attributes. XML → JSON can unwrap the document root and pretty-print JSON output.

3

Convert and export

Click Convert (counts toward the daily limit). Copy the result or download converted.xml or converted.json. Swap moves output to input and flips direction.

Why JSON and XML?

JSON dominates modern APIs; XML still powers RSS, SOAP, legacy enterprise feeds, and config files. Converting between them lets you bridge old and new systems without server-side scripts.

Why use this tool

  • JSON to XML and XML to JSON
  • Custom root element name
  • Attributes via @key in JSON
  • Import .json or .xml files
  • Live JSON syntax check (JSON → XML mode)
  • Unlimited — no daily cap

Questions

What does JSON ⇄ XML do?

It converts JSON documents to XML and parses XML back into JSON using the browser DOMParser.

How do I represent XML attributes in JSON?

Prefix the key with @ — for example "@id": "1" becomes id="1" on the element. Text-only content may appear as #text when attributes are present.

Can I choose the XML root element?

Yes. Set Root tag before converting JSON to XML. The entire JSON object becomes children of that root element.

What about namespaces and CDATA?

Standard conversion handles common element trees. Advanced namespace prefixes and CDATA sections are not specially modeled — use a dedicated XML library for complex documents.

Is my data sent to a server?

No. Conversion runs entirely in this tab.

Is there a daily limit?

No. This tool has no daily cap.

If Easy24 helped, buy a coffee

Tools stay free in your browser. One-time thanks via Kreosus. Turkish cards work.

Buy a coffee

Similar Developer tools

See all